Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!umich!ox.com!yale!eagle.wesleyan.edu!hoberoi From: hoberoi@eagle.wesleyan.edu Newsgroups: comp.unix.aix Subject: Message-ID: <1991Apr20.183436.41985@eagle.wesleyan.edu> Date: 20 Apr 91 23:34:36 GMT References: <1991Apr17.192557.5133@batcomputer.tn.cornell.edu> Organization: Wesleyan University Lines: 41 In article <1991Apr17.192557.5133@batcomputer.tn.cornell.edu>, kakazu@theory.tn.cornell.edu (Gary Kakazu) writes: > It appears that if a Fortran program calls a C program, and the C > program calls the routine getenv, the program crashes. If I comment [....] yep ! it does crash. I discovered this problem when I rebuilt the VOGLE library. Turns out that this bug (?) got introduced, after we applied the most recent update of the operating system (3.1.0003). Older EXECUTABLES function ok but relinking with the older version of the library crashes the programs. xde traces the problem to the call to getenv. Only mixing C code with FORTRAN crashes the programs. Here is the bit of code with the error message from xde: -----X-----X----- char path[120], *flib; if ((flib = getenv("VFONTLIB")) == (char *)NULL) { strcpy(path, FONTLIB); strcat(path, fontname); } else { strcpy(path, flib); ..... segmentation violation in move._move at 0x10003d34 0x10003d34 (_move+0xec) 7d00052a stsx r8,r0,r0 [using soft_stat.char] ----X-----X Lucky us that we saved all our earlier executables !!! sigh! Himanshu.