Bugs item #1524150, was opened at 2006-07-17 22:09
Message generated for change (Comment added) made by zowie
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100612&aid=1524150&group_id=612
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Bill Coffman (bmurrayc)
Assigned to: Nobody/Anonymous (nobody)
Summary: pdl constructor undefined behaviour
Initial Comment:
pdl constructor has undefined behaviour for list of
pdls of different dimensionality.
perldl> print pdl zeroes(5), zeroes(10)
*** glibc detected *** malloc(): memory corruption:
0x08632b98 ***
Aborted
Should die more gracefully.
----------------------------------------------------------------------
>Comment By: Craig DeForest (zowie)
Date: 2006-07-18 05:08
Message:
Logged In: YES
user_id=20200
Are you using the current CVS? The constructor follows the prescribed behavior
on my systems -- all the examples you list yield zero-padded PDLs with no
corruption. I just tested on MacOS X (PPC), Fedora (x86-32), and Fedora
(x86-64).
----------------------------------------------------------------------
Comment By: Bill Coffman (bmurrayc)
Date: 2006-07-17 22:39
Message:
Logged In: YES
user_id=1538801
I think the prescribed behavior is to zero fill the shorter
of the vectors, when the pdl c'tor is given a list.
You can get interesting combinations of failures and successes:
print pdl([(0)x13], zeroes 9); # fails
print pdl([(0)x13], zeroes 1); # kind of succeeds
print pdl([(0)x11], zeroes 10); # fails
print pdl(zeroes(11),[(0)x10]); # succeeds
print pdl([(0)x9], zeroes 10); # succeeds
print pdl(zeroes(99),zeroes(98)); # fails
print pdl(zeroes(98),zeroes(99)); # succeeds
print pdl(zeroes(6),[(0)x5]); # succeeds
At least that's for i386, ubuntu, glibc 2.3.6
We might want to rethink the default behaviour of the c'tor.
At least one user thought 1D lists would append.
----------------------------------------------------------------------
Comment By: Bill Coffman (bmurrayc)
Date: 2006-07-17 22:16
Message:
Logged In: YES
user_id=1538801
Oops! the above actually works, which is, in a way worse,
but this one fails.
perldl> print pdl zeroes(100), zeroes(10)
*** glibc detected *** malloc(): memory corruption:
0x08632b98 ***
Aborted
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100612&aid=1524150&group_id=612
|