gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] GCL 2.6.5 on FC3


From: Camm Maguire
Subject: [Gcl-devel] GCL 2.6.5 on FC3
Date: 13 Jan 2005 12:07:16 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!

FC3 has made brk() added pages non-executable by default.  You need
this at the end of h/386-linux.h:

#ifdef IN_SFASL
#include <sys/mman.h>
#define CLEAR_CACHE {\
   void *p,*pe; \
   p=(void *)((unsigned long)memory->cfd.cfd_start & ~(PAGESIZE-1)); \
   pe=(void *)((unsigned long)(memory->cfd.cfd_start+memory->cfd.cfd_size) & 
~(PAGESIZE-1)) + PAGESIZE-1; \
   if (mprotect(p,pe-p,PROT_READ|PROT_WRITE|PROT_EXEC)) {\
     fprintf(stderr,"%p %p\n",p,pe);\
     perror("");\
     FEerror("Cannot mprotect", 0);\
   }\
}
#endif

Not sure what the overhead of this is on each load, but we might just
make it the Linux default across the board for simplicity.
Alternatively, would either need a runtime or compile time test to
detect when its needed.  I'll place this on the errata page for
inclusion in any possible 2.6.6, and do something easy in CVS head for
now. 

Thanks for your report!

Take care,

Sandip Ray <address@hidden> writes:

> Thanks a lot for your help, Camm. I got an error trace from your
> instructions. Here is the output of the last :bt.
> 
> 
> Error: Caught fatal error [memory may be damaged]
> Error signalled by PROGN.
> Broken at COND.  Type :H for Help.
> ACL2>>:bt
> 
> #0   LOAD {} [ihs=15]
> #1   COMPILE-ACL2 {} [ihs=8]
> #2   LOAD {loc0=nil,loc1=nil,loc2=nil,loc3=(lisp:lambda-block compile-acl2
> nil ...)} [ihs=7]
> #3   EVAL {loc0=nil,loc1=nil,loc2=nil,loc3=#<compiled-function
> load>,loc4=#p"workxxx.lsp",...} [ihs=6]
> #4   TOP-LEVEL {} [ihs=5]
> #5   FUNCALL {loc0=#<compiled-function
> system:top-level>,loc1=nil,loc2=0,loc3=0,loc4=nil,loc5...} [ihs=4]
> NIL
> 
> In case I misinterpreted your instructions, I am also adding the
> transcript of the entire session of what I did at the bottom of this
> email.
> 
> Again, thanks a lot for all the help,
> 
> Sandip.
> 
> address@hidden acl2-sources-new]#echo '(load "init.lsp")' > workxxx
> address@hidden acl2-sources-new]# echo '(acl2::compile-acl2)' >> workxxx
> address@hidden acl2-sources-new]# echo '(acl2::exit-lisp)' >> workxxx
> address@hidden acl2-sources-new]# cat workxxx
> (load "init.lsp")
> (acl2::compile-acl2)
> (acl2::exit-lisp)
> address@hidden acl2-sources-new]# gdb 
> /usr/local/lib/gcl-2.6.5/unixport/saved_gcl
> GNU gdb Red Hat Linux (6.1post-1.20040607.43rh)
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db 
> library "/lib/tls/libthread_db.so.1".
> 
> (gdb) b error
> Breakpoint 1 at 0x804bb0d: file main.c, line 432.
> (gdb) b FEerror
> Breakpoint 2 at 0x80b3c86: file error.c, line 261.
> (gdb) r
> Starting program: /usr/local/lib/gcl-2.6.5/unixport/saved_gcl
> GCL (GNU Common Lisp)  2.6.5 CLtL1    Jan 10 2005 07:45:29
> Source License: LGPL(gcl,gmp), GPL(unexec,bfd)
> Binary License:  GPL due to GPL'ed components: (READLINE BFD UNEXEC)
> Modifications of this banner must retain notice of a compatible license
> Dedicated to the memory of W. Schelter
> 
> Use (help) to get some basic information on how to use GCL.
> Loading init.lsp
> Loading acl2r.lisp
> Finished loading acl2r.lisp
> Loading acl2-init.lisp
> Loading acl2.lisp
> Loading acl2-fns.lisp
> Finished loading acl2-fns.lisp
> Compiling acl2-fns.lisp.
> End of Pass 1.
> 
> ;; Note: Tail-recursive call of GET-TYPE-FROM-DCLS was replaced by iteration.
> ;; Note: Tail-recursive call of COLLECT-TYPES was replaced by iteration.
> ;; Note: Tail-recursive call of OUTPUT-TYPE-FOR-DECLARE-FORM-REC was replaced 
> by iteration.
> ;; Note: Tail-recursive call of REV1@ was replaced by iteration.
> ;; Note: Tail-recursive call of ACL2-READ-CHARACTER-STRING was replaced by 
> iteration.[GC for 211 CONS pages..(T=1).GC finished]
> 
> End of Pass 2.
> Detaching after fork from child process 28777.
> OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
> Finished compiling acl2-fns.lisp.
> Loading acl2-fns.o
> start address -T 0x84566e0 Finished loading acl2-fns.o
> Finished loading acl2.lisp
> Finished loading acl2-init.lisp
> Loading enable-eval.lisp
> Disabling evaluation inside breaks.
> Finished loading enable-eval.lisp
> Finished loading init.lsp
> 
> >(si::use-fast-links nil)
> 
> NIL
> 
> >(load "workxxx")
> 
> Loading workxxx
> Loading init.lsp
> Finished loading init.lsp
> Loading axioms.lisp
> [GC for 211 CONS pages..(T=0).GC finished]
> [GC for 49 SYMBOL pages..(T=0).GC finished]
> Finished loading axioms.lisp
> Compiling axioms.lisp.
> [GC for 1030 CONS pages..(T=1).GC finished]
> [GC for 38 ARRAY pages..(T=1).GC finished]
> [GC for 57 ARRAY pages..(T=1).GC finished]
> [GC for 32 STRING pages..(T=2).GC finished]
> End of Pass 1.
> [GC for 32 STRING pages..(T=2).GC finished]
> [GC for 73 SYMBOL pages..(T=2).GC finished]
> End of Pass 2.
> Detaching after fork from child process 28780.
> OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
> Finished compiling axioms.lisp.
> Loading axioms.o
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x080b1af3 in call_init (init_address=0, memory=0x8503f64,
>     fasl_vec=0x8a1b6e4, fptr=0) at cmpaux.c:333
> 333       (*at)();
> (gdb) bt
> #0  0x080b1af3 in call_init (init_address=0, memory=0x8503f64,
>     fasl_vec=0x8a1b6e4, fptr=0) at cmpaux.c:333
> #1  0x080781ef in fasload (faslfile=0x8a6b288) at sfaslbfd.c:379
> #2  0x080c0da5 in Lload () at file.d:1842
> #3  0x080b7bd8 in eval (form=0x83af280) at eval.c:1090
> #4  0x0806a7d4 in Fprogn (body=0x85fa408) at prog.c:248
> #5  0x080b796d in eval (form=0x85fa4f8) at eval.c:1037
> #6  0x080635a1 in For (args=0x85fa3e4) at predicate.c:762
> #7  0x080b796d in eval (form=0x85fa534) at eval.c:1037
> #8  0x0806a7d4 in Fprogn (body=0x85fa3d8) at prog.c:248
> #9  0x080dc56d in Flet (form=0x85fa564) at let.c:82
> #10 0x080b796d in eval (form=0x85fa5dc) at eval.c:1037
> #11 0x080635a1 in For (args=0x85fa3cc) at predicate.c:762
> #12 0x080b796d in eval (form=0x85fa618) at eval.c:1037
> #13 0x08069bba in Ftagbody (body=0x85fa3c0) at prog.c:95
> #14 0x080db88f in Fdolist (arg=0x85fa624) at iteration.c:357
> #15 0x080b796d in eval (form=0x85fa648) at eval.c:1037
> #16 0x0806a7d4 in Fprogn (body=0x85fa3b4) at prog.c:248
> #17 0x080dc56d in Flet (form=0x85fa654) at let.c:82
> #18 0x080b796d in eval (form=0x85fae64) at eval.c:1037
> #19 0x080b63cf in funcall (fun=0x8622520) at eval.c:327
> #20 0x080b666d in funcall_no_event (fun=0x85fa378) at eval.c:381
> #21 0x080b7be5 in eval (form=0x83af280) at eval.c:1092
> #22 0x080c13a8 in Lload () at file.d:1910
> #23 0x080b7bd8 in eval (form=0x83af280) at eval.c:1090
> #24 0x080b80c9 in fLeval (x0=0x8586d20) at eval.c:1178
> #25 0x080c9a47 in c_apply_n (fn=0x80b806d <fLeval>, n=1, x=0x8228148)
>     at funlink.c:271
> #26 0x08050b14 in IapplyVector (fun=0x83cae24, nargs=1, base=0x8228148)
>     at nfunlink.c:229
> #27 0x080b5d31 in funcall (fun=0x83cae24) at eval.c:190
> #28 0x080b6ce2 in symlispcall (sym=0x83c91f8, base=0x8228144, narg=1)
>     at eval.c:507
> #29 0x08163353 in LI1 () at gcl_top.c:140
> #30 0x080b5263 in quick_call_sfun (fun=0x8503fa0) at eval.c:117
> #31 0x080b5cad in funcall (fun=0x8503fa0) at eval.c:178
> #32 0x08050c57 in IapplyVector (fun=0x8503fa0, nargs=0, base=0x822811c)
>     at nfunlink.c:239
> #33 0x080b7e50 in fLfuncall (fun=0x8503fa0) at eval.c:1140
> #34 0x080c9a47 in c_apply_n (fn=0x80b7dc7 <fLfuncall>, n=1, x=0x8228118)
>     at funlink.c:271
> #35 0x08050b14 in IapplyVector (fun=0x83cae4c, nargs=1, base=0x8228118)
>     at nfunlink.c:229
> #36 0x080b5d31 in funcall (fun=0x83cae4c) at eval.c:190
> #37 0x080b666d in funcall_no_event (fun=0x83cae4c) at eval.c:381
> #38 0x080b7be5 in eval (form=0x83af280) at eval.c:1092
> #39 0x080b63cf in funcall (fun=0x8553f78) at eval.c:327
> #40 0x080b666d in funcall_no_event (fun=0x8606c3c) at eval.c:381
> #41 0x080b7be5 in eval (form=0x83af280) at eval.c:1092
> #42 0x080b63cf in funcall (fun=0x8553f88) at eval.c:327
> #43 0x080b73ef in super_funcall (fun=0x8606ff0) at eval.c:743
> #44 0x0804b950 in main (argc=1, argv=0xfefff994, envp=0xfefff99c)
>     at main.c:369
> (gdb) c
> Continuing.
> 
> Breakpoint 1, error (s=0x8200ebf "Segmentation violation.") at main.c:432
> 432           if (catch_fatal>0 && interrupt_enable )
> (gdb) bt
> #0  error (s=0x8200ebf "Segmentation violation.") at main.c:432
> #1  0x0804c02a in segmentation_catcher (i=11) at main.c:651
> #2  <signal handler called>
> #3  0x080b1af3 in call_init (init_address=0, memory=0x8503f64,
>     fasl_vec=0x8a1b6e4, fptr=0) at cmpaux.c:333
> #4  0x080781ef in fasload (faslfile=0x8a6b288) at sfaslbfd.c:379
> #5  0x080c0da5 in Lload () at file.d:1842
> #6  0x080b7bd8 in eval (form=0x83af280) at eval.c:1090
> #7  0x0806a7d4 in Fprogn (body=0x85fa408) at prog.c:248
> #8  0x080b796d in eval (form=0x85fa4f8) at eval.c:1037
> #9  0x080635a1 in For (args=0x85fa3e4) at predicate.c:762
> #10 0x080b796d in eval (form=0x85fa534) at eval.c:1037
> #11 0x0806a7d4 in Fprogn (body=0x85fa3d8) at prog.c:248
> #12 0x080dc56d in Flet (form=0x85fa564) at let.c:82
> #13 0x080b796d in eval (form=0x85fa5dc) at eval.c:1037
> #14 0x080635a1 in For (args=0x85fa3cc) at predicate.c:762
> #15 0x080b796d in eval (form=0x85fa618) at eval.c:1037
> #16 0x08069bba in Ftagbody (body=0x85fa3c0) at prog.c:95
> #17 0x080db88f in Fdolist (arg=0x85fa624) at iteration.c:357
> #18 0x080b796d in eval (form=0x85fa648) at eval.c:1037
> #19 0x0806a7d4 in Fprogn (body=0x85fa3b4) at prog.c:248
> #20 0x080dc56d in Flet (form=0x85fa654) at let.c:82
> #21 0x080b796d in eval (form=0x85fae64) at eval.c:1037
> #22 0x080b63cf in funcall (fun=0x8622520) at eval.c:327
> #23 0x080b666d in funcall_no_event (fun=0x85fa378) at eval.c:381
> #24 0x080b7be5 in eval (form=0x83af280) at eval.c:1092
> #25 0x080c13a8 in Lload () at file.d:1910
> #26 0x080b7bd8 in eval (form=0x83af280) at eval.c:1090
> #27 0x080b80c9 in fLeval (x0=0x8586d20) at eval.c:1178
> #28 0x080c9a47 in c_apply_n (fn=0x80b806d <fLeval>, n=1, x=0x8228148)
>     at funlink.c:271
> #29 0x08050b14 in IapplyVector (fun=0x83cae24, nargs=1, base=0x8228148)
>     at nfunlink.c:229
> #30 0x080b5d31 in funcall (fun=0x83cae24) at eval.c:190
> #31 0x080b6ce2 in symlispcall (sym=0x83c91f8, base=0x8228144, narg=1)
>     at eval.c:507
> #32 0x08163353 in LI1 () at gcl_top.c:140
> #33 0x080b5263 in quick_call_sfun (fun=0x8503fa0) at eval.c:117
> #34 0x080b5cad in funcall (fun=0x8503fa0) at eval.c:178
> #35 0x08050c57 in IapplyVector (fun=0x8503fa0, nargs=0, base=0x822811c)
>     at nfunlink.c:239
> #36 0x080b7e50 in fLfuncall (fun=0x8503fa0) at eval.c:1140
> #37 0x080c9a47 in c_apply_n (fn=0x80b7dc7 <fLfuncall>, n=1, x=0x8228118)
>     at funlink.c:271
> #38 0x08050b14 in IapplyVector (fun=0x83cae4c, nargs=1, base=0x8228118)
>     at nfunlink.c:229
> #39 0x080b5d31 in funcall (fun=0x83cae4c) at eval.c:190
> #40 0x080b666d in funcall_no_event (fun=0x83cae4c) at eval.c:381
> #41 0x080b7be5 in eval (form=0x83af280) at eval.c:1092
> #42 0x080b63cf in funcall (fun=0x8553f78) at eval.c:327
> #43 0x080b666d in funcall_no_event (fun=0x8606c3c) at eval.c:381
> #44 0x080b7be5 in eval (form=0x83af280) at eval.c:1092
> #45 0x080b63cf in funcall (fun=0x8553f88) at eval.c:327
> #46 0x080b73ef in super_funcall (fun=0x8606ff0) at eval.c:743
> #47 0x0804b950 in main (argc=1, argv=0xfefff994, envp=0xfefff99c)
>     at main.c:369
> (gdb) c
> Continuing.
> 
> Breakpoint 2, FEerror (
>     s=0x8200d40 "Caught fatal error [memory may be damaged]", num=0)
>     at error.c:261
> 261     char *p = s;
> (gdb) bt
> #0  FEerror (s=0x8200d40 "Caught fatal error [memory may be damaged]", num=0)
>     at error.c:261
> #1  0x0804bb54 in error (s=0x8200ebf "Segmentation violation.") at main.c:440
> #2  0x0804c02a in segmentation_catcher (i=11) at main.c:651
> #3  <signal handler called>
> #4  0x080b1af3 in call_init (init_address=0, memory=0x8503f64,
>     fasl_vec=0x8a1b6e4, fptr=0) at cmpaux.c:333
> #5  0x080781ef in fasload (faslfile=0x8a6b288) at sfaslbfd.c:379
> #6  0x080c0da5 in Lload () at file.d:1842
> #7  0x080b7bd8 in eval (form=0x83af280) at eval.c:1090
> #8  0x0806a7d4 in Fprogn (body=0x85fa408) at prog.c:248
> #9  0x080b796d in eval (form=0x85fa4f8) at eval.c:1037
> #10 0x080635a1 in For (args=0x85fa3e4) at predicate.c:762
> #11 0x080b796d in eval (form=0x85fa534) at eval.c:1037
> #12 0x0806a7d4 in Fprogn (body=0x85fa3d8) at prog.c:248
> #13 0x080dc56d in Flet (form=0x85fa564) at let.c:82
> #14 0x080b796d in eval (form=0x85fa5dc) at eval.c:1037
> #15 0x080635a1 in For (args=0x85fa3cc) at predicate.c:762
> #16 0x080b796d in eval (form=0x85fa618) at eval.c:1037
> #17 0x08069bba in Ftagbody (body=0x85fa3c0) at prog.c:95
> #18 0x080db88f in Fdolist (arg=0x85fa624) at iteration.c:357
> #19 0x080b796d in eval (form=0x85fa648) at eval.c:1037
> #20 0x0806a7d4 in Fprogn (body=0x85fa3b4) at prog.c:248
> #21 0x080dc56d in Flet (form=0x85fa654) at let.c:82
> #22 0x080b796d in eval (form=0x85fae64) at eval.c:1037
> #23 0x080b63cf in funcall (fun=0x8622520) at eval.c:327
> #24 0x080b666d in funcall_no_event (fun=0x85fa378) at eval.c:381
> #25 0x080b7be5 in eval (form=0x83af280) at eval.c:1092
> #26 0x080c13a8 in Lload () at file.d:1910
> #27 0x080b7bd8 in eval (form=0x83af280) at eval.c:1090
> #28 0x080b80c9 in fLeval (x0=0x8586d20) at eval.c:1178
> #29 0x080c9a47 in c_apply_n (fn=0x80b806d <fLeval>, n=1, x=0x8228148)
>     at funlink.c:271
> #30 0x08050b14 in IapplyVector (fun=0x83cae24, nargs=1, base=0x8228148)
>     at nfunlink.c:229
> #31 0x080b5d31 in funcall (fun=0x83cae24) at eval.c:190
> #32 0x080b6ce2 in symlispcall (sym=0x83c91f8, base=0x8228144, narg=1)
>     at eval.c:507
> #33 0x08163353 in LI1 () at gcl_top.c:140
> #34 0x080b5263 in quick_call_sfun (fun=0x8503fa0) at eval.c:117
> #35 0x080b5cad in funcall (fun=0x8503fa0) at eval.c:178
> #36 0x08050c57 in IapplyVector (fun=0x8503fa0, nargs=0, base=0x822811c)
>     at nfunlink.c:239
> #37 0x080b7e50 in fLfuncall (fun=0x8503fa0) at eval.c:1140
> #38 0x080c9a47 in c_apply_n (fn=0x80b7dc7 <fLfuncall>, n=1, x=0x8228118)
>     at funlink.c:271
> #39 0x08050b14 in IapplyVector (fun=0x83cae4c, nargs=1, base=0x8228118)
>     at nfunlink.c:229
> #40 0x080b5d31 in funcall (fun=0x83cae4c) at eval.c:190
> #41 0x080b666d in funcall_no_event (fun=0x83cae4c) at eval.c:381
> #42 0x080b7be5 in eval (form=0x83af280) at eval.c:1092
> #43 0x080b63cf in funcall (fun=0x8553f78) at eval.c:327
> #44 0x080b666d in funcall_no_event (fun=0x8606c3c) at eval.c:381
> #45 0x080b7be5 in eval (form=0x83af280) at eval.c:1092
> #46 0x080b63cf in funcall (fun=0x8553f88) at eval.c:327
> #47 0x080b73ef in super_funcall (fun=0x8606ff0) at eval.c:743
> #48 0x0804b950 in main (argc=1, argv=0xfefff994, envp=0xfefff99c)
>     at main.c:369
> (gdb) c
> Continuing.
> 
> Error: Caught fatal error [memory may be damaged]
> Error signalled by PROGN.
> Broken at COND.  Type :H for Help.
> ACL2>>:bt
> 
> #0   LOAD {} [ihs=15]
> #1   COMPILE-ACL2 {} [ihs=8]
> #2   LOAD {loc0=nil,loc1=nil,loc2=nil,loc3=(lisp:lambda-block compile-acl2 
> nil ...)} [ihs=7]
> #3   EVAL {loc0=nil,loc1=nil,loc2=nil,loc3=#<compiled-function 
> load>,loc4=#p"workxxx.lsp",...} [ihs=6]
> #4   TOP-LEVEL {} [ihs=5]
> #5   FUNCALL {loc0=#<compiled-function 
> system:top-level>,loc1=nil,loc2=0,loc3=0,loc4=nil,loc5...} [ihs=4]
> NIL
> ACL2>>
> 
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

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