[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] ANSI Windows: in-package failure
From: |
Camm Maguire |
Subject: |
Re: [Gcl-devel] ANSI Windows: in-package failure |
Date: |
02 Feb 2004 11:12:09 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Greetings!
Mike Thomas <address@hidden> writes:
> Hi Camm.
>
> While delving further into the crash in the ANSI tests on Windows this
> evening with I accidentally fired up unixport/saved_gcl rather than
> unixport/saved_ansi_gcl.
>
> It crashed while presenting an error about no "cl-user" package and
> further investigation shows that giving a bad package name to
> saved_ansi_gcl has the same result. Do you get the same result on
> Linux?
>
> On the basis that this is a really simple bug to reproduce and seems
> similar to the other bug I have made it the next target in my
> cargo-cult debugging program (you, of course, are the silver bird)!
>
> Briefly and referring to the debugger output below, a check for an
> argument type to format goes wrong at line 179 of typespec.c where a
> NULL pointer is dereferenced, which is the fLformat() argument
> "control" (format.c).
>
> This situation is coming from a call to
> Iinvoke_c_function_from_value_stack() in nfunlink.c
> where there are 4 arguments passed to c_apply_n are : x[0]=nil,
> x[1]=NULL, x[2]="GFGF", x[4]="No such package" where GFGF is the bad
> package name.
>
> If my understanding of this sequence is correct, x[1] (NULL) is the
> control string to be used by format.
>
> This means that at the call to Lformat() in the function LC27() in
> "clcs_kcl_cond.c" the format string is already NULL. Unfortunately it
> is late in the evening and the meaning of the value stack
> manipulations in LC27() have left me completely confused.
>
OK, this is very much Windows specific, i.e. does not occur on the
Linux build. Great job in identifying a simple test case to chase
down! I would suggest breaking at in_package, and stepping through
each call in the error reporting function tree, printing out both the C
argumens and the lisp stack at each step. Then I can do likewise and
we can comppare. I.e., a C argument given as an object can be
investigated in gdb via
p <address>->d
p <address>->c (if cons, etc.) or by
p pp(address)
The lisp stack can be examined via
p vs_top-vs_base
For each element between vs_top and vs_base, i.e. for i from 0 to
vs_top-vs_base, do
p vs_base[i]
p vs_base[i]->d
p vs_base[i]->c (if cons, etc.) or
p pp(vs_base[i])
Mike, it would also be very helpful if we could enumerate the #ifdefs
in the main code used in the Windows port, as well as any applicable
#+winnt macros, so we can have an ever shrinking subset of spaces to
search for issues like these.
Take care,
> Cheers
>
> Mike Thomas.
>
>
> $ gdb unixport/saved_ansi_gcl.exe
> GNU gdb 6.0
> 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 "i686-pc-mingw32"...
> (gdb) (use-fast-links nil)
> Undefined command: "". Try "help".
> (gdb) r
> Starting program: c:\cvs\head\gcl/unixport/saved_ansi_gcl.exe
> 0x0064D830 BSS start in memory.
> 0x00b40000 BSS offset in saved executable.
> 0x00114e40 BSS size in bytes.
> 0x00114e40 bytes read.
> 0x10100000 Heap start in memory.
> 0x00740000 Heap offset in executable.
> 0x00400000 Heap size in bytes.
> 0x10100000 file base.
> GCL (GNU Common Lisp) (2.7.0) Sun Feb 1 15:14:03 EAST 2004
> Licensed under GNU Library General Public License
> Dedicated to the memory of W. Schelter
>
> Use (help) to get some basic information on how to use GCL.
>
> >(use-fast-links nil)
>
> Error in EVAL [or a callee]: The function USE-FAST-LINKS is undefined.
>
> Fast links are on: do (use-fast-links nil) for debugging
> Broken at EVAL. Type :H for Help.
> 1 (Continue) Return to top level.
> dbl:>>:q
> Broken at EVAL.
> NIL
> dbl:>>:r
>
> Top level.
> >(si::use-fast-links nil)
>
> NIL
>
> >(in-package 'gfgf)
>
> Error in IN-PACKAGE [or a callee]: A package error occurred on GFGF:
> "No such pa
> ckage".
>
> Broken at INVOKE-DEBUGGER. Type :H for Help.
> 1 (Continue)
> Program received signal SIGSEGV, Segmentation fault.
> 0x00476f35 in check_type_string (p=0x22e224) at typespec.c:179
> 179 while (type_of(*p) != t_string)
> (gdb) bt
> #0 0x00476f35 in check_type_string (p=0x22e224) at typespec.c:179
> #1 0x00430e24 in fLformat (strm=0x10414b40, control=0x0) at format.c:2217
> #2 0x00431ceb in c_apply_n (fn=0x430d4d <fLformat>, n=4, x=0x22e270)
> at funlink.c:366
> #3 0x0044a841 in Iinvoke_c_function_from_value_stack (f=0x430d4d
> <fLformat>,
> fargd=32322) at nfunlink.c:293
> #4 0x00430d48 in Lformat () at format.c:2194
> #5 0x0049c15a in LC27 (base0=0x6bf5a4) at clcs_kcl_cond.c:790
> #6 0x0041dd41 in funcall_no_event (fun=0x103fc3b8) at eval.c:369
> #7 0x0041ebde in super_funcall_no_event (fun=0x103fc3b8) at eval.c:767
> #8 0x004b4b8e in L29 () at clcs_restart.c:844
> #9 0x0041d35a in funcall (fun=0x1029e380) at eval.c:173
> #10 0x0043149e in call_or_link (sym=0x1033d8b8, link=0x635e98) at
> funlink.c:75
> #11 0x004b6d71 in LnkT99 () at clcs_restart.c:1732
> #12 0x004b4332 in L18 () at clcs_restart.c:551
> #13 0x0041d35a in funcall (fun=0x1029e390) at eval.c:173
> #14 0x0041eb05 in super_funcall (fun=0x1029e390) at eval.c:743
> #15 0x0041fe80 in ifuncall3 (fun=0x1033dad4, arg1=0x103d75e8,
> arg2=0x1010a4c8,
> arg3=0x6b3f80) at eval.c:1335
> #16 0x0045b17a in call_structure_print_function (x=0x103d75e8, level=0)
> at print.d:542
> #17 0x0045d50b in write_object (x=0x103d75e8, level=0) at print.d:1334
> #18 0x0045f45d in princ (obj=0x103d75e8, strm=0x1010a4c8) at print.d:1899
> ---Type <return> to continue, or q <return> to quit---q
> Quit (expect signal SIGINT when the program is resumed)
>
>
>
>
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
- Re: [Gcl-devel] Window ansi crash debug output, Mike Thomas, 2004/02/01
- [Gcl-devel] ANSI Windows: in-package failure, Mike Thomas, 2004/02/01
- Re: [Gcl-devel] ANSI Windows: in-package failure,
Camm Maguire <=
- RE: [Gcl-devel] ANSI Windows: in-package failure, Mike Thomas, 2004/02/03
- Re: [Gcl-devel] ANSI Windows: in-package failure, Camm Maguire, 2004/02/03
- Re: [Gcl-devel] ANSI Windows: in-package failure, Mike Thomas, 2004/02/04
- Re: [Gcl-devel] ANSI Windows: in-package failure, Camm Maguire, 2004/02/04
- Re: [Gcl-devel] ANSI Windows: in-package failure, Mike Thomas, 2004/02/09
- Re: [Gcl-devel] ANSI Windows: in-package failure, Camm Maguire, 2004/02/11
- RE: [Gcl-devel] ANSI Windows: in-package failure, Mike Thomas, 2004/02/15
- Re: [Gcl-devel] ANSI Windows: in-package failure, Camm Maguire, 2004/02/16
- RE: [Gcl-devel] ANSI Windows: in-package failure, Mike Thomas, 2004/02/16
- Re: [Gcl-devel] ANSI Windows: in-package failure, Camm Maguire, 2004/02/17