I “fixed” it by masking it out — attempting to do the thing that tickled the 
bug now throws a meaningful error message instead.

The issue is in the way reshape() is implemented (using setdims()), interacting 
with the way mv() is implemented.  The mv() code pre-caches the dimlist offsets 
for both parent and child, so if some dims disappear from the parent or child, 
then in the next dataflow operation the mv() trans code can dereference a 
pointer to hyperspace.  One way to fix that would be to check against ndims() 
each time — but setdims() and reshape() shouldn’t be called on dataflow-linked 
PDLs anyhow (they’re mostly for doing things like slurping in a data file and 
then formatting it once it is in memory), so it made sense (to me) to simply 
mask out the behavior.

There are some tests to make sure reshape() throws an error in the proper 
condition, and doesn’t in other conditions.




> On Nov 14, 2015, at 8:02 PM, Karl Glazebrook <[email protected]> wrote:
> 
> 
> The reshape() bug was fixed?
> 
> Is there a test?
> 
> Karl
> 
> 
>> On 15 Nov 2015, at 8:18 am, Chris Marshall <[email protected]> wrote:
>> 
>> All-
>> 
>> ...and should be appearing at a mirror
>> near you soon.  This release is the first
>> release candidate for the upcoming
>> PDL-2.015 release.  It has fixes for the
>> major problems found in the PDL-2.014
>> release.
>> 
>> Please test for your platformsand with
>> your PDL modules and programs as soon as
>> possible.  The PDL-2.015 release will be
>> no later than 01-Dec and by next weekend
>> if things test well!
>> 
>> Thanks,
>> Chris
>> 
>> ---------------------------------------------------------------
>> 
>> v2.014_01 2015-11-14 14:01:28-05:00
>> 
>> General Notes:
>> 
>> * This is PDL-2.014_01, a cleanup and bug fix release.
>> 
>> 
>> Highlights:
>> 
>> * Add $PDL::indxformat for PDL_Indx and
>>  Make new_pdl_from_string() avoid converting IV values to NVs
>> 
>>  PDL_Indx values (type indx) now print with an integer
>>  format specification so all digits get printed.  In
>>  addition pdl(indx, '[ 9007199254740992 ]') works as well
>>  going the other direction.
>> 
>> * Fix sf.net bug 403: reshape can't handle piddles with -C flag
>> 
>>  reshape() on a piddle with dataflow isn't meaningful.
>>  Now a warning is given.  You can $pdl->sever first
>>  and then reshape() can be applied.
>> 
>> * Fix sf.net bug 406: clump() produces bogus dims
>> 
>> * Various build improvments and documentation fixes:
>> 
>>  - force new_pdl_from_string to return a piddle with P=physical flag
>>  - remove spurious '}' from gnuplot demo
>>  - Basic/Ops/ops.pd - make compatible with MSVC++ 6.0
>>  - Fix win10 breakage in t/flexraw_fortran.t
>>  - improving PDL::GSL::RNG documentation
>>  - Add type convert info to POD for the pdl() constructor
>> 
>> 
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> pdl-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pdl-general
> 


------------------------------------------------------------------------------
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to