[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IDL 5.3 serious problem: save files sneakily restored



IDL 5.3 appears to have a major hull breach.

If there is an idl save file named "<whatever>.sav" in the current
directory,
the contents of that file get restored whenever <whatever> is referenced as
a function within IDL.

<whatever> does not have to be a string.
It must have the ".sav" extension, and must be a valid IDL save file.

This is very dangerous, because there is no telling when local variables
will suddenly get overwritten.

I checked the online help documentation and didn't see anything about
this immediately.  Even if it is a documented feature, it's a mistake.

This was discovered because we have a function called fitlines.pro
which wasn't being run because there was a goddammed savefile called
fitlines.sav in the current directory.

The log of a demonstration is appended below.

Comments?

Vinay
______________________________________________________________________

suppose, in the current directory, there are some IDL savefiles:
(which were made say, as follows:
idl
IDL> x=findgen(100)
IDL> save,file='whatever.sav'
IDL> y=x^2
IDL> save,file='kursk.sav'
IDL> exit
)

Then, when you start IDL and say

idl
IDL> print,!version
{ sparc sunos unix 5.3 Nov 11 1999}
IDL> help
% At  $MAIN$                 
Compiled Procedures:
    $MAIN$

Compiled Functions:

IDL> help,whatever()
% Restored file: WHATEVER.
% Attempt to call undefined procedure/function: 'WHATEVER'.
% Execution halted at:  $MAIN$                 
IDL> help
% At  $MAIN$                 
X               FLOAT     = Array[100]
Compiled Procedures:
    $MAIN$
Compiled Functions:


IDL> tmp=kursk()
% Restored file: KURSK.
% Attempt to call undefined procedure/function: 'KURSK'.
% Execution halted at:  $MAIN$
IDL> help
% At  $MAIN$                 
TMP             UNDEFINED = <Undefined>
X               FLOAT     = Array[100]
Y               FLOAT     = Array[100]
Compiled Procedures:
    $MAIN$

Compiled Functions:


IDL> 

-- 
______________________________________________________________________________
kashyap@head-cfa.harvard.edu         617 495 7173 [CfA/P-146] 617 496 7173 [F]