[Pdl-porters] [Judd] t/gd_oo_tests.t fails on 64 bit Mac, succeeds on 32 bit Ubuntu

David Mertens dcmertens.perl at gmail.com
Wed Mar 28 06:41:59 HST 2012


Hello eveyrbody -

I was testing Chris's latest changes to PDL and ran across a test issue
with the GD object-oriented interface. It took me a while, I but eventually
figured out that it does not give trouble on my 32 bit Ubuntu 10.10,
running Perl 5.10.1. On the other hand, it does fail for a 64 bit Mac OSX
Lion running either Perl 5.14.1 (via perlbrew) or Perl 5.10.1
(vendor-supplied).

Specifically, the test fails with a segfault just after test 19, during the
DESTROY phase. This particular test creates a gd image from a pdl input, so
I thought that perhaps there were issues freeing PDL memory, but I see that
the constructor copies the contents of the pdl, so that should be fine.
Furthermore, the PDL datatype for the pointers is correct (based on my
experience with PDL::Drawing::Prima) as a long long, and making minor
modifications to that so it more closely resembles my pointer-based code
does not improve matters.

Further tests, especially non-OO methods that copy data from PDL to GD,
would be helpful here.

David

-- 
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.jach.hawaii.edu/pipermail/pdl-porters/attachments/20120328/b2b9fe77/attachment.html>


More information about the PDL-porters mailing list