From: Ken Lindsay (kl++at++email.arc.nasa.gov)
Date: 03/13/2002 14:03:28
I'm getting very obscure problems running my code on
Linux (SGI cluster, standard system setup, PF 2.5,
Linux master-channel 2.4.2-5SGI_137smp #1 SMP ). It
compiles fine, but at runtime, certain local variables
are reported as undefined in current scope. That causes
pfLoadFile() to hang. Other variables declared in the
same block act normally. I set optimizer to -O0 to
try to avoid any weird behavior from that. -g is also
turned on.
I've included the fragment from the OpenFlight loader
callback, which is called during the pfLoadFile() call.
What happens is that some of the local variables exist
and some don't. int foo, for example, exists at some
point because fprintf() prints its value. breakpointing
at the if(foo) and also at the fprinf() however, showed
foo to be undefined in current scope, until I made it
static.
I get similar behavior from char* MGcbTmpStr , but not
from char *tempEnv .
I'm going to do a work around since this has stumped
me and two others (who know a lot more than I do).
The code works very well on IRIX. If anyone has some
insight on making it work on linux, please let me know.
thansk
ken
_____________________________
Ken Lindsay ) kl++at++email.arc.nasa.gov
NASA Ames Research Center ) QSS Group, Inc.
Bldg 269, Room 281 ) (650) 604 0461 (lab)
Mail Stop 269-1 ) (650) 604 3594 (fax)
Moffett Field, CA 94035 ) (650) 604 3181 (vox)
)______________________
When inlaws are outlawed, only outlaws will have inlaws
Official SPAM policy:
cat /dev/nails.rusty >> /proc/spammer; head | nails
This archive was generated by hypermail 2b29 : Wed Mar 13 2002 - 14:03:52 PST