|
Re: BUG: How to crash IDL using !null [message #75234 is a reply to message #75230] |
Mon, 21 February 2011 03:32  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
This is what I get
IDL> print,!version
{ x86_64 linux unix linux 8.0.1 Oct 7 2010 64 64}
IDL> a={b:dindgen(10)}
IDL> help,(a.b)[!null]
<Expression> UNDEFINED = !NULL
% Temporary variables are still checked out - cleaning up...
IDL> help,a.b[!null]
Segmentation fault (core dumped)
|
|
|
Re: BUG: How to crash IDL using !null [message #75236 is a reply to message #75234] |
Mon, 21 February 2011 02:45  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Am 20.02.2011 06:48, schrieb M. Katz:
> Here's a serious crash I found in IDL 8.0.1 (Mac) {not tested on other
> platforms yet} having to do with !null as an array index in a
> structure field that happens to be an array.
>
> THIS WORKS NORMALLY:
>
> a = fltarr(10)
> w = where(a EQ 99, /null) ;--- here w will be !null
> a[w] = 1. ;--- these two are interchangeable since w is !null
> a[!null] = 1.
>
> THIS CRASHES IDL:
>
> a = {b:fltarr(10)} ;--- create a structure with an array
> w = where(a.b EQ 99, /null) ;--- here w will be !null
> print, w ;--- show us that w is !null
IDL> f = {test:[1,2]}
IDL> print, f.test[!null]
crashes it too, looks like it is not consitantly for all types implementd
Reimar
> a.b[w] = 1 ;--- here it crashes for me.
> a.b[!null] = 1 ;--- this equivalent statement also crashes.
>
> I haven't yet tried this with all forms of lists and hashes, pointers
> etc.
> Anyone have any ideas besides, "Don't do that."
>
> M.
|
|
|