gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Re: SGC/SAVE-SYSTEM Bug in Apple MacIntosh Version of GCL, M


From: Camm Maguire
Subject: [Gcl-devel] Re: SGC/SAVE-SYSTEM Bug in Apple MacIntosh Version of GCL, MacOS 10.3.4
Date: 15 Jan 2005 17:37:12 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings, and please excuse this followup to an old email.  Am going
through all that I saved as outstanding GCL issue emails in
preparation for 2.6.6.  

I've verified this.  Aurelien, what appears to be happening is that
the C stack is getting write protected on sgc-on/saved-system.  This
should make it quite easy to find out where the bug is.
Unfortunately, for me it will have to wait for 2.7, a 2.6.6 needs to
go out quickly.  

Just to repeat, SGC will be disabled in 2.6.6 until we can sort this
out, so all should work properly out of the box.  I am verifying the
ACL2 books no this build now.

Take care,

Robert Boyer <address@hidden> writes:

> Hi Aurelien and Camm,
> 
> After building GCL 2.6.4 and GCL 2.7.0 on different Apple MacIntosh computers
> (one G4 and one G5) and having tested it extensively (and happily with SGC
> turned off), it seems pretty clear that there is a bug that involves an
> interaction between SGC and SAVE-SYSTEM.
> 
> One can easily produce this error as follows.  Start up gcl and execute
> 
>    (si::sgc-on t)
>    (si::save-system "foo")
> 
> Then start
> 
>    chmod +x foo
>    gdb foo
>    run
> 
> One gets the error message:
> 
>    Program received signal EXC_BAD_ACCESS, Could not access memory.
> 
> Going through this exercise omitting the (SI::SGC-ON T) does not seem to
> result in an error.  In our experience executing (under Nqthm) an image saved
> after doing (SI::SGC-ON T), the errors one gets from GCL are really random.
> Just not doing the (SI::SGC-ON T) seems to make the errors go away.
> 
> Warren and Bob
> ++++++++++++++
> 
> 
> Bob-Boyers-Computer:~ boyer$ date
> Wed Aug 11 16:50:35 CDT 2004
> Bob-Boyers-Computer:~ boyer$ gcl/gcl-2.6.4/unixport/saved_gcl 
> GCL (GNU Common Lisp)  2.6.4 CLtL1    Aug 10 2004 09:25:06
> Source License: LGPL(gcl,gmp), GPL(unexec,bfd)
> Binary License:  GPL due to GPL'ed components: (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.
> 
> >(si::sgc-on t)
> 
> T
> 
> >(si::save-system "foo")
> DBEGIN:          0x1ac000
> mach_mapstart:   0x5f4000
> heap_end:        0x9fc000
> core_end:        0x9fd000
> mach_brkpt:     0x9f8a000
> mach_maplimit: 0x201ac000
> --- List of All Regions ---
>    address       size prot maxp zone_name
>          0     0x1000 none none (no zone)
>     0x1000     0x1000 r x  rwx  (no zone)
>     0x2000   0x1aa000 r x  rwx  (no zone)
>   0x1ac000     0x1000 rw   rwx  (no zone)
>   0x1ad000     0xe000 r x  rwx  (no zone)
>   0x1bb000     0x1000 rwx  rwx  (no zone)
>   0x1bc000     0x1000 rwx  rwx  (no zone)
>   0x1bd000     0x1000 rwx  rwx  (no zone)
>   0x1be000     0x3000 r x  rwx  (no zone)
>   0x1c1000     0x1000 rwx  rwx  (no zone)
>   0x1c2000     0x1000 rwx  rwx  (no zone)
>   0x1c3000     0x1000 r x  rwx  (no zone)
>   0x1c4000   0x35c000 r x  rwx  (no zone)
>   0x520000     0x1000 rwx  rwx  (no zone)
>   0x521000     0x8000 r x  rwx  (no zone)
>   0x529000    0x21000 rwx  rwx  (no zone)
>   0x54a000     0x3000 r x  rwx  (no zone)
>   0x54d000     0x2000 rwx  rwx  (no zone)
>   0x54f000    0x1f000 r x  rwx  (no zone)
>   0x56e000     0x1000 rwx  rwx  (no zone)
>   0x56f000    0x80000 r x  rwx  (no zone)
>   0x5ef000     0x1000 rwx  rwx  (no zone)
>   0x5f0000     0x1000 r x  rwx  (no zone)
>   0x5f1000     0x1000 rwx  rwx  (no zone)
>   0x5f2000     0x2000 rwx  rwx  (no zone)
>   0x5f4000     0x1000 r x  rwx  (no zone)
>   0x5f5000     0x1000 r x  rwx  (no zone)
>   0x5f6000     0x4000 rwx  rwx  (no zone name)
>   0x5fa000     0x1000 r x  rwx  (no zone)
>   0x5fb000     0x1000 r x  rwx  (no zone)
>   0x5fc000     0x1000 rwx  rwx  (no zone)
>   0x5fd000     0x1000 r x  rwx  (no zone)
>   0x5fe000     0x1000 r x  rwx  (no zone)
>   0x5ff000     0x1000 r x  rwx  (no zone)
>   0x600000     0x1000 r x  rwx  (no zone)
>   0x601000     0x2000 rwx  rwx  (no zone name)
>   0x603000     0x4000 r x  rwx  (no zone)
>   0x607000     0x1000 rwx  rwx  (no zone)
>   0x608000     0x5000 r x  rwx  (no zone)
>   0x60d000     0x1000 r x  rwx  (no zone)
>   0x60e000     0x1000 r x  rwx  (no zone)
>   0x60f000   0x24d000 rwx  rwx  (no zone name)
>   0x85c000     0x1000 r x  rwx  (no zone)
>   0x85d000    0x1f000 rwx  rwx  (no zone name)
>   0x87c000     0x6000 r x  rwx  (no zone)
>   0x882000     0x2000 rwx  rwx  (no zone)
>   0x884000     0xd000 r x  rwx  (no zone)
>   0x891000     0x1000 rwx  rwx  (no zone)
>   0x892000     0x5000 r x  rwx  (no zone)
>   0x897000     0x1000 rwx  rwx  (no zone)
>   0x898000    0x1f000 r x  rwx  (no zone)
>   0x8b7000     0x1000 rwx  rwx  (no zone)
>   0x8b8000    0x1b000 r x  rwx  (no zone)
>   0x8d3000     0x1000 rwx  rwx  (no zone)
>   0x8d4000     0xe000 r x  rwx  (no zone)
>   0x8e2000     0x1000 rwx  rwx  (no zone)
>   0x8e3000     0x2000 r x  rwx  (no zone)
>   0x8e5000     0x2000 rwx  rwx  (no zone)
>   0x8e7000     0x2000 r x  rwx  (no zone)
>   0x8e9000     0xf000 rwx  rwx  (no zone)
>   0x8f8000     0x3000 r x  rwx  (no zone)
>   0x8fb000     0xa000 rwx  rwx  (no zone)
>   0x905000     0x1000 r x  rwx  (no zone)
>   0x906000     0xd000 rwx  rwx  (no zone)
>   0x913000     0x1000 r x  rwx  (no zone)
>   0x914000    0x12000 rwx  rwx  (no zone)
>   0x926000     0x1000 r x  rwx  (no zone)
>   0x927000    0x2c000 rwx  rwx  (no zone)
>   0x953000     0x1000 r x  rwx  (no zone)
>   0x954000    0x2f000 rwx  rwx  (no zone)
>   0x983000    0x40000 r x  rwx  (no zone)
>   0x9c3000     0x1000 rwx  rwx  (no zone)
>   0x9c4000     0x1000 rwx  rwx  (no zone)
>   0x9c5000     0x1000 rwx  rwx  (no zone)
>   0x9c6000     0x1000 rwx  rwx  (no zone)
>   0x9c7000     0x1000 rwx  rwx  (no zone)
>   0x9c8000     0x1000 rwx  rwx  (no zone)
>   0x9c9000     0x1000 rwx  rwx  (no zone)
>   0x9ca000     0x1000 rwx  rwx  (no zone)
>   0x9cb000     0x1000 rwx  rwx  (no zone)
>   0x9cc000     0x1000 rwx  rwx  (no zone)
>   0x9cd000     0x1000 rwx  rwx  (no zone)
>   0x9ce000     0x1000 rwx  rwx  (no zone)
>   0x9cf000     0x1000 rwx  rwx  (no zone)
>   0x9d0000     0x1000 rwx  rwx  (no zone)
>   0x9d1000     0x1000 rwx  rwx  (no zone)
>   0x9d2000     0x1000 rwx  rwx  (no zone)
>   0x9d3000     0x1000 rwx  rwx  (no zone)
>   0x9d4000     0x1000 rwx  rwx  (no zone)
>   0x9d5000     0x1000 rwx  rwx  (no zone)
>   0x9d6000     0x1000 rwx  rwx  (no zone)
>   0x9d7000     0x1000 rwx  rwx  (no zone)
>   0x9d8000     0x1000 rwx  rwx  (no zone)
>   0x9d9000     0x1000 rwx  rwx  (no zone)
>   0x9da000     0x1000 rwx  rwx  (no zone)
>   0x9db000     0x1000 rwx  rwx  (no zone)
>   0x9dc000     0x1000 rwx  rwx  (no zone)
>   0x9dd000     0x1000 rwx  rwx  (no zone)
>   0x9de000     0x1000 rwx  rwx  (no zone)
>   0x9df000     0x1000 rwx  rwx  (no zone)
>   0x9e0000     0x1000 rwx  rwx  (no zone)
>   0x9e1000     0x1000 rwx  rwx  (no zone)
>   0x9e2000     0x1000 rwx  rwx  (no zone)
>   0x9e3000     0x1000 rwx  rwx  (no zone)
>   0x9e4000     0x1000 rwx  rwx  (no zone)
>   0x9e5000     0x1000 rwx  rwx  (no zone)
>   0x9e6000     0x1000 rwx  rwx  (no zone name)
>   0x9e7000  0x3310000 r x  rwx  (no zone)
> --- List of Regions to be Dumped ---
>    address       size prot maxp zone_name
>          0     0x1000 none none (no zone)
>     0x1000   0x1ab000 r x  rwx  (no zone)
>   0x1ac000     0x1000 rw   rwx  (no zone)
>   0x1ad000     0xe000 r x  rwx  (no zone)
>   0x1bb000     0x3000 rwx  rwx  (no zone)
>   0x1be000     0x3000 r x  rwx  (no zone)
>   0x1c1000     0x2000 rwx  rwx  (no zone)
>   0x1c3000   0x35d000 r x  rwx  (no zone)
>   0x520000     0x1000 rwx  rwx  (no zone)
>   0x521000     0x8000 r x  rwx  (no zone)
>   0x529000    0x21000 rwx  rwx  (no zone)
>   0x54a000     0x3000 r x  rwx  (no zone)
>   0x54d000     0x2000 rwx  rwx  (no zone)
>   0x54f000    0x1f000 r x  rwx  (no zone)
>   0x56e000     0x1000 rwx  rwx  (no zone)
>   0x56f000    0x80000 r x  rwx  (no zone)
>   0x5ef000     0x1000 rwx  rwx  (no zone)
>   0x5f0000     0x1000 r x  rwx  (no zone)
>   0x5f1000     0x3000 rwx  rwx  (no zone)
>   0x5f4000     0x2000 r x  rwx  (no zone)
>   0x5f6000     0x4000 rwx  rwx  (no zone name)
>   0x5fa000     0x2000 r x  rwx  (no zone)
>   0x5fc000     0x1000 rwx  rwx  (no zone)
>   0x5fd000     0x4000 r x  rwx  (no zone)
>   0x601000     0x2000 rwx  rwx  (no zone name)
>   0x603000     0x4000 r x  rwx  (no zone)
>   0x607000     0x1000 rwx  rwx  (no zone)
>   0x608000     0x7000 r x  rwx  (no zone)
>   0x60f000   0x24d000 rwx  rwx  (no zone name)
>   0x85c000     0x1000 r x  rwx  (no zone)
>   0x85d000    0x1f000 rwx  rwx  (no zone name)
>   0x87c000     0x6000 r x  rwx  (no zone)
>   0x882000     0x2000 rwx  rwx  (no zone)
>   0x884000     0xd000 r x  rwx  (no zone)
>   0x891000     0x1000 rwx  rwx  (no zone)
>   0x892000     0x5000 r x  rwx  (no zone)
>   0x897000     0x1000 rwx  rwx  (no zone)
>   0x898000    0x1f000 r x  rwx  (no zone)
>   0x8b7000     0x1000 rwx  rwx  (no zone)
>   0x8b8000    0x1b000 r x  rwx  (no zone)
>   0x8d3000     0x1000 rwx  rwx  (no zone)
>   0x8d4000     0xe000 r x  rwx  (no zone)
>   0x8e2000     0x1000 rwx  rwx  (no zone)
>   0x8e3000     0x2000 r x  rwx  (no zone)
>   0x8e5000     0x2000 rwx  rwx  (no zone)
>   0x8e7000     0x2000 r x  rwx  (no zone)
>   0x8e9000     0xf000 rwx  rwx  (no zone)
>   0x8f8000     0x3000 r x  rwx  (no zone)
>   0x8fb000     0xa000 rwx  rwx  (no zone)
>   0x905000     0x1000 r x  rwx  (no zone)
>   0x906000     0xd000 rwx  rwx  (no zone)
>   0x913000     0x1000 r x  rwx  (no zone)
>   0x914000    0x12000 rwx  rwx  (no zone)
>   0x926000     0x1000 r x  rwx  (no zone)
>   0x927000    0x2c000 rwx  rwx  (no zone)
>   0x953000     0x1000 r x  rwx  (no zone)
>   0x954000    0x2f000 rwx  rwx  (no zone)
>   0x983000    0x40000 r x  rwx  (no zone)
>   0x9c3000    0x23000 rwx  rwx  (no zone)
>   0x9e6000     0x1000 rwx  rwx  (no zone name)
>   0x9e7000  0x3310000 r x  rwx  (no zone)
> --- Header Information ---
> Magic      = 0xfeedface
> CPUType    = 18
> CPUSubType = 0
> FileType   = 0x2
> NCmds      = 12
> SizeOfCmds = 1860
> Flags      = 0x00000085
> Highest address of load commands in input file:   0x3fe46000
> Lowest offset of all sections in __TEXT segment:      0x770
> --- List of Load Commands in Input File ---
> no cmd                 cmdsize name                address       size
>  0 LC_SEGMENT             0x38 __PAGEZERO                0     0x1000
>  1 LC_SEGMENT            0x29c __TEXT               0x1000   0x1ab000
>                                __text               0x1770   0x193ffc
>                                __picsymbol_stub   0x19576c          0
>                                __symbol_stub      0x19576c          0
>                                __picsymbolstub1   0x19576c     0x1580
>                                __cstring          0x196cec    0x12734
>                                __literal4         0x1a9420       0x18
>                                __literal8         0x1a9438      0x118
>                                __const            0x1a9550     0x1a80
>                                __eh_frame         0x1aafd0       0x38
>  2 LC_SEGMENT            0x214 __DATA             0x1ac000   0x448000
>                                __data             0x1ac000     0xa450
>                                __la_symbol_ptr    0x1b6450      0x2b0
>                                __nl_symbol_ptr    0x1b6700      0x9b0
>                                __dyld             0x1b70b0       0x1c
>                                __const            0x1b70cc     0x2264
>                                __bss              0x1b9330     0x3f78
>                                __common           0x1bd2b0   0x436a94
>  3 LC_SEGMENT             0x7c __DATA             0x5f4000 0x1fbb8000
>                                __data             0x5f4000   0x3d0000
>  4 LC_SEGMENT             0x38 __LINKEDIT       0x3fd64000    0xe2000
>  5 LC_LOAD_DYLINKER       0x1c
>  6 LC_LOAD_DYLIB          0x30
>  7 LC_LOAD_DYLIB          0x34
>  8 LC_SYMTAB              0x18
>  9 LC_DYSYMTAB            0x50
> 10 LC_TWOLEVEL_HINTS      0x10
> 11 LC_UNIXTHREAD          0xb0
> --- Load Commands written to Output File ---
> Writing segment __PAGEZERO       at          0 -          0 (sz:          0)
> Writing segment __TEXT           at          0 -   0x1ab000 (sz:   0x1ab000)
> Writing segment __DATA           at   0x1ab000 -   0x5f3000 (sz:   0x448000)
>         section __data           at   0x1ab000 -   0x1b5450 (sz:     0xa450)
>         section __la_symbol_ptr  at   0x1b5450 -   0x1b5700 (sz:      0x2b0)
>         section __nl_symbol_ptr  at   0x1b5700 -   0x1b60b0 (sz:      0x9b0)
>         section __dyld           at   0x1b60b0 -   0x1b60cc (sz:       0x1c)
>         section __const          at   0x1b60cc -   0x1b8330 (sz:     0x2264)
>         section __bss            at   0x1b8330 -   0x1bc2a8 (sz:     0x3f78)
>         section __common         at   0x1bc2b0 -   0x5f2d44 (sz:   0x436a94)
> Writing segment __DATA           at   0x5f3000 -   0x9fc000 (sz:   0x409000)
> Writing segment __LINKEDIT       at   0xdcc000 -   0xead4d8 (sz:    0xe14d8)
> Writing LC_LOAD_DYLINKER  command
> Writing LC_LOAD_DYLIB     command
> Writing LC_LOAD_DYLIB     command
> Writing LC_SYMTAB         command
> Fixed up 0/17 external relocation entries in data segment.
> Writing LC_DYSYMTAB       command
> Writing LC_TWOLEVEL_HINTS command
> Writing LC_UNIXTHREAD     command
> 16 unused bytes follow Mach-O header
> Bob-Boyers-Computer:~ boyer$ ls -l foo
> -rwxr-xr-x  1 boyer  boyer  15389912 11 Aug 16:51 foo
> Bob-Boyers-Computer:~ boyer$ gdb foo
> GNU gdb 5.3-20030128 (Apple version gdb-309) (Thu Dec  4 15:41:30 GMT 2003)
> Copyright 2003 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 "powerpc-apple-darwin".
> Reading symbols for shared libraries ... done
> (gdb) run
> Starting program: /Users/boyer/foo 
> Reading symbols for shared libraries .. done
> 
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> 0xffff8660 in __bzero ()
> (gdb) 
> 
> 
> 

-- 
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]