[Top][All Lists]

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

[Gcl-devel] Re: possible GCL/Windows compiler bug

From: Matt Kaufmann
Subject: [Gcl-devel] Re: possible GCL/Windows compiler bug
Date: Tue, 12 Oct 2004 10:26:19 -0500

Hi --

Thanks very much for the quick reply!  I have some questions.

When I tried gdb on ACL2/linux saved_acl2.gcl (built with GCL 2.6.5), and 

  gdb linux-gcl-saved_acl2.gcl

then I got the following unfortunate result (where I edited out the pathname):

  GNU gdb 5.3
  Copyright 2002 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-linux-gnu"...(no debugging symbols 
  (gdb) b fasload
  Function "fasload" not defined.
  (gdb) r
  Starting program: .../linux-gcl-saved_acl2.gcl 
  (no debugging symbols found)...(no debugging symbols found)...(no debugging 
symbols found)...
  Program received signal SIGSEGV, Segmentation fault.
  0x400c5d45 in memset () from /lib/libc.so.6

Is it necessary to build ACL2 with some special settings somehow in order to
get debug info?

In 4), how do you submit a Lisp LOAD command inside gdb?  Also, in 2), how do
we arrange that r will run the particular commands that triggered the break?

General issue:  Recall that when we re-compile the match-clause function, the
error goes away.  Doesn't that suggest that your approach won't trigger the
error in 8)?

Thanks --
-- Matt
   Cc: address@hidden, "Mike Thomas" <address@hidden>,
   From: Camm Maguire <address@hidden>
   Date: 12 Oct 2004 10:40:23 -0400
   User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
   Content-Type: text/plain; charset=us-ascii
   X-SpamAssassin-Status: No, hits=-2.6 required=5.0
   X-UTCS-Spam-Status: No, hits=-332 required=180


   OK, my suspicion lies with a difficulty in the windows relocation
   code, but I'm not yet certain.  Here is how to proceed:

   0) run saved_acl2 under gdb 

   1) b fasload

   2) r

   3) Put your match-clause function into a separate file, compile with
      compiler::*c-debug* set to t

   4) (load "your_file.o")

   5) gdb will break -- type 'finish'

   6) Still at gdb prompt, look at start address printed by gcl to
      screen.  Type 'add-symbol-file <your_file.o> <address>

   7) c

   8) trigger the error

   9) gdb will stop, print a backtrace with bt

   10) In gdb, type 'p/x *(char *)<address>@1024'

   11) In gdb, type 'shell', and then 'objdump -d your_file.o'

   12) Send me the results

   Take care,

   Matt Kaufmann <address@hidden> writes:

   > [Resending -- I had a typo in the CC field that may have prevented 
   > Hi --
   > Help!?  Sorry to bother you with this email, but I've gone about as far as 
   > know how with the problem described below (and I'll spare you the dead 
   > which I kind of suspect is a problem with GCL/Windows, but might instead 
be a
   > problem with ACL2.  This is a rather long email; please feel free to ask 
   > any clarification.
   > There appears to be a problem either with GCL on Windows or with ACL2.  
   > describe the symptom below.  This symptom doesn't occur on Linux or 
   > for GCL, Allegro CL, CMUCL, or CLISP, and I also haven't seen it on Linux 
   > Lispworks or on a Macintosh with OpenMCL; I've only seen it on GCL/Windows.
   > But I realize that it still could be a subtle problem with ACL2, so I 
think we
   > need to wait on the ACL2 release until we determine whether or not it's a
   > GCL/Windows problem.
   > Jared Davis was kind enough to submit the commands below (at the end of 
   > email) while standing in directory books/misc/ of the ACL2 distribution, 
   > building ACL2 on GCL/Windows 2.6.5.  The result is a hard Lisp error if 
you do
   > *NOT* submit the compile form below: for a transcript, see
   > http://www.cs.utexas.edu/users/jared/test.log5 (or equivalently, on the 
   > file system, /u/www/users/jared/test.log5).  But *with* the compile form, 
   > problem goes away (see test.log4 in the same directory).  We verified that 
   > definition being compiled is exactly the same as the one compiled when 
   > ACL2.  (I'll explain how if you're interested -- we could insert a call of
   > disassemble during the build if you think that would be helpful.)
   > You can see the result of :bt and :ihs on a failed run, where some source
   > functions are run interpreted (but this doesn't avoid the error since the
   > offending function ACL2_*1*_ACL2::MATCH-CLAUSE is still run compiled), in
   > test.log in that same directory.  In a moment I'll forward you a related 
   > with that info (and also the result of :bl), in case you prefer to see it 
   > email.
   > By the way, all of the failures Jared came across during the regression run
   > were during macroexpansion of ACL2 macro case-match, which calls
   > match-clause-list, which calls match-clause -- actually the ACL2 
   > mechanism causes a call of ACL2_*1*_ACL2::MATCH-CLAUSE-LIST, which calls
   > Also by the way, even if you leave off the compile form below but you add
   > (si::use-fast-links nil), the problem goes away.  That seems odd to me so I
   > thought I should mention it.
   > Here are the commands after starting up ACL2.  Again, omit the compile 
form to
   > see the error -- even though the compile form should be a no-op!
   > (rebuild "defpun.lisp" 'arbitrary-tail-recursive-encap)
   > :q
   > (compile
   >    (COND
   >      (RETURN-FROM
   >       ACL2_*1*_ACL2::MATCH-CLAUSE
   >               (ACL2_*1*_ACL2::MATCH-TESTS-AND-BINDINGS X PAT NIL NIL)
   >               (LIST (IF (ACL2_*1*_COMMON-LISP::NULL TESTS) T
   >                         (CONS 'AND
   >                               (ACL2_*1*_COMMON-LISP::REVERSE TESTS)))
   >                     (CONS 'LET
   >                           (CONS (ACL2_*1*_COMMON-LISP::REVERSE
   >                                  BINDINGS)
   >                                 FORMS)))))))
   > (lp)
   > (defun remove-xargs-domain-and-measure (dcl)
   >   (case-match dcl
   >     (('declare ('xargs ':domain dom-expr
   >                        ':measure measure-expr
   >                        . rest))
   >      (mv nil dom-expr measure-expr rest))
   >     (('declare ('xargs ':gdomain dom-expr
   >                        ':measure measure-expr
   >                        . rest))
   >      (mv t dom-expr measure-expr rest))
   >     (& (mv nil nil 0 nil))))
   > Thanks much --
   > -- Matt

   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]