logo       

[ pdl-Bugs-1524150 ] pdl constructor undefined behaviour: msg#00054

Subject: [ pdl-Bugs-1524150 ] pdl constructor undefined behaviour
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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe