On 1/2/2012 10:13 AM, Bryan Jurish wrote:
moin Chris,

Likewise.  I think I may have run up against the crash-scenarios a few
times myself in the past, but apparently managed to work around them by
catching empty piddles on the perl level.  Still, I don't understand how
empty (but non-null) piddles managed to segfault perl, but then again,
my understanding of the PDL core is very poor.  Can somebody clue me in
on this, e.g. with a pointer to some previous list discussion on the topic?


The key is that a piddle is a C structure and that
automatic threading and computation is handled at
the C level by PP using the information in that
structure.  If the information such as dimension
consistency is violated, then things break at the
XS stage which is a crash at the C/perl level and
not at the Perl/perl level.

See PDL::API and the Basic/Core directory in the
source distribution for details.  This is some
of the stuff that I hope is documented better in
the PDL book work on-going.

Cheers,
Chris

marmosets,
        Bryan

On 2011-12-20 14:37:08, chm<[email protected]>    appears to have
written:
On 12/20/2011 6:25 AM, Bryan Jurish wrote:
On 2011-12-18 22:56, chm wrote:
Fails tests:
MOOCOW/PDL-CCS-1.14.tar.gz (requires PDL::VectorValued)

Should be fixed (band-aided) in newest PDL::CCS on CPAN
(MOOCOW/PDL-CCS-1.15.tar.gz).  The culprit seems to have been a
change
in the PDL core's handling of Nx0 piddles somewhere between 2.4.9 and
2.4.9_015.  Report filed as sourceforge bug #3462924

(https://sourceforge.net/tracker/?func=detail&aid=3462924&group_id=612&atid=100612).



     This is a degenerate case, but it can easily happen in PDL::CCS
(sparse piddles) as a result of run-of-the-mill internal index-piddle
twiddling.

Hi Bryan-

I'm not sure I comprehend what a [2,0] shaped
piddle means.  My first thought is that it
should not be returned by dice_axis at all.

There have been some changes to PDL since 2.4.9
in *exactly* those edge cases.  But the previous
handling caused segfaults in perl.  I would like
for some feedback from the range-master based
on further discussion.

Maybe you could post separately to the mailing
list with some examples showing where non-trivial
0 length dimensions were supported, how they
arise in practice...  In particular, is there
different code approaches that could work?








_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to