From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10a636,f2d97d13067056a2 X-Google-Attributes: gid10a636,public X-Google-Thread: 108899,f2d97d13067056a2 X-Google-Attributes: gid108899,public X-Google-Thread: 10f594,f2d97d13067056a2 X-Google-Attributes: gid10f594,public X-Google-Thread: fee84,f2d97d13067056a2 X-Google-Attributes: gidfee84,public From: bkm@rlsaxp.bnsc.rl.ac.uk (Brian McIlwrath) Subject: Re: BEWARE of DECunix f77 3.8 compiler! Date: 1995/09/13 Message-ID: <436d1k$1qn0@unixfe.rl.ac.uk>#1/1 X-Deja-AN: 110057375 references: organization: Rutherford Appleton Laboratory, OXON, UK followup-to: comp.unix.osf.osf1,cern.alpha,cern.osf,cern.heplib newsgroups: comp.unix.osf.osf1,cern.alpha,cern.osf,cern.heplib I believe that I have also found another major (but unrelated) bug in DEC FORTRAN 3.8! The effect which caused me to look for this bug is that processes were becoming impervious to SIGTERM signals and were having to be killed by SIGKILL - thus negating some exit code. I traced the problem down to the very simple example below. This seems to show that the RTL is not resetting the process signal mask after altering it during critical operations. This was reported to DEC UK about 6 weeks ago but with little obvious effect. An example which shows the bug is: Given the following f77 program program bkm call showsig print *, "Hello world" call showsig end where SHOWSIG is in C and is: #include #include void showsig_(void) { sigset_t curmask=0; if( sigprocmask(0, NULL, &curmask) <0) perror("sigprocmask"); fprintf(stderr, "showsig - sigprocmask is %lx\n", curmask); } gives the following output when run: showsig - sigprocmask is 0 Hello world showsig - sigprocmask is 3ff4c04e Tracing calls to sigprocmask() with dbx shows that it is being called twice by the RTL function for__add_to_lf_table(). I speculate that it is disabling signals for a critical operation but then failing to reenable them properly. System is: DEC Unix (OSF) V3.2 Fortran V3.8 Fortran RTL V3.6 ------------------------------------------------------------------------- Brian McIlwrath, Starlink Project, Rutherford Appleton Laboratory, UK. Tel: +44 (0)1235 446478 e-mail: bkm@star.rl.ac.uk -------------------------------------------------------------------------