gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Re: gcl_signal


From: Mike Thomas
Subject: [Gcl-devel] Re: gcl_signal
Date: Sat, 26 Jun 2004 00:44:13 +1000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)

Hi again.

I wrote yesterday:
Hi Camm.

As a last minute thought before 2.6.2 marches out the door, what do you
think of these items?

1. in "usig.c"

   EXTER char signals_handled[6];


2. in mingw.h there is this:

#define OTHER_SIGNALS_HANDLED SIGTERM,SIGKILL,SIGABRT,


3. in "usig2.c" we have:

char signals_handled [] = {SIGINT,SIGUSR2,SIGUSR1,SIGIO,SIGALRM,
#ifdef OTHER_SIGNALS_HANDLED
                           OTHER_SIGNALS_HANDLED
#endif
                           0};


(that is, on Windows, eight items + a zero end element - 9 in all compared
to 6 in the declaration in point 1 above) - I'm wondering whether these
things might confuse a compiler?

In HEAD I increased the declaration size to 32 to cover the max number of signals. I also added a definition of INSTALL_SEGMENTATION_CATCHER to mingw.h to address the problem of an immediate exit from GCL whenever a seg fault occurred on Windows. This allows examination of the Lisp environment from the Lisp debugger after a seg fault, so for example, the gcc 3.3.3 crash at specfn.o load in the Maxima build is reported as appended below. The down side is that it stops the problem from dumping out to the C debugger - ie for that you need to rebuild without the handler.



4. also in "usig.c"

void
install_default_signals(void)
{       gcl_signal(SIGFPE, sigfpe1);
        gcl_signal(SIGPIPE, sigpipe);
        gcl_signal(SIGINT, sigint);
        gcl_signal(SIGUSR1, sigusr1);
        gcl_signal(SIGIO, sigio);
        gcl_signal(SIGALRM, sigalrm);

        /*install_segmentation_catcher(); */
        signals_allowed = sig_normal;
      }

(that is, SIGUSR2 (inserted in signals_handled) is not installed, but
SIGPIPE and SIGFPE (not present in the signals_handled vector) are at least
passed into the function even if not dealt with.)

This I leave to you to consider. I think it is only a cosmetic issue now, but it is late here so...



5. in "main.c" install_segmentation_catcher also runs gcl_signal on SIGSEGV,
which is, also, not present in the signals_handled vector.

Not any more.


Cheers

Mike Thomas.

.....
;    - Compiling module "special-functions"
;      - Loading binary file "binary-gcl/specfn.o"
Loading binary-gcl/specfn.o
Error in CONDITIONS::CLCS-LOAD [or a callee]: Caught fatal error [memory may be
damaged]

Fast links are on: do (use-fast-links nil) for debugging
Broken at FILLARRAY.  Type :H for Help.
 1 (Continue) Retry loading file "binary-gcl/specfn.o".
 2 Return to top level.
dbl:MAXIMA>>:bt

#0 FILLARRAY {loc0=#(0.0 0.0 0.0 ...),loc1=(14.0 1.9350643000000001 0.16607303
300000001 ...),...} [ihs=58]
#1 CLCS-LOAD {file=("binary-gcl/specfn.o"),args=nil,g2560=(nil "binary-gcl/spe
cfn.o"),loc3=(#...} [ihs=57]
#2 FUNCALL {loc0=#<compiled-function conditions::clcs-load>,loc1="binary-gcl/s
pecfn.o"} [ihs=56]
#3 FUNCALL {loc0=#<compiled-function conditions::clcs-load>,loc1="binary-gcl/s
pecfn.o"} [ihs=55]
#4   LOAD-FILE-OPERATION {} [ihs=48]
#5   COMPILE-AND-LOAD-OPERATION {} [ihs=44]
#6 FUNCALL {loc0=make::compile-and-load-operation,loc1=#<FILE: specfn>,loc2=:n
ew-source-and...} [ihs=43]
#7 FUNCALL {loc0=make::compile-and-load-operation,loc1=#<FILE: specfn>,loc2=:n
ew-source-and...} [ihs=42]
#8   OPERATE-ON-COMPONENT {} [ihs=36]
#9   OPERATE-ON-COMPONENTS {} [ihs=31]
#10   OPERATE-ON-COMPONENT {} [ihs=25]
#11   OPERATE-ON-COMPONENTS {} [ihs=20]
#12   OPERATE-ON-COMPONENT {} [ihs=14]
#13   OPERATE-ON-SYSTEM {} [ihs=9]
#14 FUNCALL {loc0=make:operate-on-system,loc1="maxima",loc2=:compile,loc3=:ver
bose,loc4=t,lo...} [ihs=8]
#15 FUNCALL {loc0=make:operate-on-system,loc1="maxima",loc2=:compile,loc3=:ver
bose,loc4=t} [ihs=7]
#16   TOP-LEVEL {} [ihs=5]
#17 FUNCALL {loc0=#<compiled-function system:top-level>,loc1=nil,loc2=0,loc3=0
,loc4=nil,loc5...} [ihs=4]
NIL
dbl:MAXIMA>>:help
dbl:MAXIMA>>:bl
>> FILLARRAY():
Local(0): #(0.0 0.0 0.0 ...)
Local(1): (14.0 1.9350643000000001 0.16607303300000001 ...)
Local(2): #(0.0 0.0 0.0 ...)
Local(3): 14.0
Local(4): 15
Local(5): 0
Local(6): #(0.0 0.0 0.0 ...)
Local(7): 15
Local(8): NIL
Local(9): NIL
Local(10): NIL
NIL
dbl:MAXIMA>>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]