gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Further cygwin debugging - a step forward


From: Billinghurst, David (CRTS)
Subject: [Gcl-devel] Further cygwin debugging - a step forward
Date: Wed, 19 Dec 2001 13:56:31 -0000

Here is the results of some more debugging on cygwin.  Some progress??

There may be something of interest in o/try.c, which seems to be some
toy code
derived from NT emacs unexec.

I could compile it with (something like)
        gcc -o try.exe -I. -I../h try.c

and run it with
        ./try.exe junk

It generated a file junk.  Don't know what it does.

################ Original problem ##############

cd unixport
gdb raw_gcl.exe
    open console
    run unixport -libdir /usr/local/src/gcl

Program received signal SIGSEGV, Segmentation fault.
0x00402cb9 in add_page_to_freelist (p=0x1a100000 "", tm=0x52c598) at
alloc.c:161

(gdb) bt
#0  0x00402cb9 in add_page_to_freelist (p=0x1a100000 "", tm=0x52c598) at
alloc.c:161
#1  0x00402f06 in alloc_object (t=t_string) at alloc.c:237
#2  0x0043d690 in alloc_simple_string (l=16) at string.d:41
#3  0x004051fa in malloc (size=16) at alloc.c:1085
#4  0x6102d2c4 in _libkernel32_a_iname ()
#5  0x6102d712 in _libkernel32_a_iname ()
#6  0x6102a997 in _libkernel32_a_iname ()
#7  0x610521dc in _libkernel32_a_iname ()
#8  0x61003ba1 in _libkernel32_a_iname ()
#9  0x610041b9 in _libkernel32_a_iname ()
#10 0x610041f9 in _libkernel32_a_iname ()
#11 0x00516da3 in cygwin_crt0 ()
#12 0x0040103d in mainCRTStartup ()
#13 0x77e992a6 in _libkernel32_a_iname ()

####################### Next ########################

With revised values in gnuwin95.h

#undef DBEGIN
/* we want finer than config.h */
#define DBEGIN 0x1a000000

#define PAGEWIDTH 12

With breakpoint at original failure point of alloc.c:161
p = 0x1a100000

then get startup message and then abort at main.c:356 
with message 

GCL (GNU Common Lisp)  April 1994  32768 pages

Unrecoverable error: NULL_OR_ON_C_STACK macro invalid.

In gdb see 

(gdb) print &j
$1 = (int *) 0x22ddc0

(gdb) print Cnil
Error: No symbol "Cnil" in current context.

(gdb) print ((unsigned long)core_end)
$2 = 438075392


Now from gnuwin95.h we have

#define NULL_OR_ON_C_STACK(y)\
    (((unsigned int)(y)) == 0 ||  \
     (((unsigned int)(y)) < DBEGIN && ((unsigned int)(y)) &0xf000000))

so that NULL_OR_ON_C_STACK(&j) == 0 
since ((&j) & 0xf000000) = 0

Enough for tonight.

+++++++++++++++++++++++++++++++++++++++++
(Mr) David Billinghurst
Comalco Research Centre
PO Box 316, Thomastown, Vic, Australia, 3074
Phone:  +61 3 9469 0642
FAX:            +61 3 9462 2700
Email:  address@hidden





reply via email to

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