Menu

#126 values / multiple-value-list bug?

segfault
closed-fixed
clisp (524)
5
2002-10-15
2002-08-21
No

hello,

i have a lisp program which ends like that:

*** - Lisp stack overflow. RESET
*** - handle_fault error2 ! address = 0x1B32BE4A not in
[0x1BE30000,0x1C2052E8) !
SIGSEGV cannot be cured. Fault address = 0x1B32BE4A.

i tracked the problem down to a function which returned
multiple values and the caller of the function used
multiple-value-list to gather the results in a list. i
changed this piece of code to just return a list of
values. after this change the program works as expected.

is there perhaps any length restriction for the number
of values i return?

Discussion

  • Sam Steingold

    Sam Steingold - 2002-08-21

    Logged In: YES
    user_id=5735

    1. whenever you see a segfault, it's a CLISP bug, so please
    do attach your code that segfaults!

    2. multiple-values-limit does indeed limit the number of
    multiple values (see CLHS).

    3. what is your CLISP version?

     
  • Christian Schuhegger

    Logged In: YES
    user_id=598327

    this is the standard request for more information.
    1. what is your platform? ("uname -a" on a Unix system)
    compiler version? libc (on Linux)?
    2. where did you get the sources? when?
    (absolute dates are prefered over the relative ones)
    3. how did you build CLISP? (what command, options &c)
    please do a clean build (remove your build directory and
    build CLISP with "./configure --build build" or at least
    do a "make distclean" before "make")
    4. if you are using pre-built binaries, the problem is likely
    to be in the incompatibilities between the platform on which
    the binary was built and yours;
    please try compiling the sources.
    5. what is the output of (lisp-implementation-version)?
    6. what is the value of *features*?
    7. please supply the full output (copy and paste)
    of all the error messages.
    If you cannot build CLISP, you can obviously skip 5 and 6,
    but then you should provide more information in 1.
    please see <http://clisp.cons.org/clisp.html#bugs> for more
    information.
    Thanks.

     
  • Christian Schuhegger

    Logged In: YES
    user_id=598327

    for 1: i cannot add all my code. this are 40000 lines of
    program code and i was not able to reproduce the problem
    with smaller code snipets.

    for 2: thanks for the hint, i did not know.

    for 3: i use the 2.29 precompiled clisp binary version for
    windows.

     
  • Sam Steingold

    Sam Steingold - 2002-08-21

    Logged In: YES
    user_id=5735

    what is your win32 version? is it the real thing (NT) or the
    toy (95)?
    do you have msvc?
    if yes, could you please recompile?
    if not, can you get cygwin, build with it and try to
    reproduce the problem?
    I want you to try a patch, but you need a C compiler to test it.

     
  • Sam Steingold

    Sam Steingold - 2002-08-21

    Logged In: YES
    user_id=5735

    please try the attached patch

     
  • Sam Steingold

    Sam Steingold - 2002-08-21

    a tentative patch

     
  • Christian Schuhegger

    Logged In: YES
    user_id=598327

    ok,

    downloaded sources, applied patch, compiled them with msvc6
    and get still the same result:

    *** - Lisp stack overflow. RESET
    *** - handle_fault error2 ! address = 0x199572ED not in
    [0x1A480000,0x1A979424) !
    SIGSEGV cannot be cured. Fault address = 0x199572ED.

    but i checked that multiple-values-limit is 128 and i
    returned 140 return values and by the way not through
    (values ...) but through (values-list ...).

    do you perhaps not check this limit yourself?

    hope this helps.

     
  • Sam Steingold

    Sam Steingold - 2002-08-21

    Logged In: YES
    user_id=5735

    actually, values-list does check the limit.
    please generate the makefile with "makemake debug" (see
    Makemake.devel in the top-level for other options) and remake.
    then set breakpoints in STACK_ueber() and C_values_list
    and figure out where we crash.

    thanks a lot - your help is appreciated!

     
  • Sam Steingold

    Sam Steingold - 2002-09-27

    Logged In: YES
    user_id=5735

    any progress in the last month?

     
  • Christian Schuhegger

    Logged In: YES
    user_id=598327

    i sent you two private mails telling you:
    i did not find a Makemake.devel. only a Makefile.devel. and
    please remember i am on a win2k machine. i don't have a
    makemake. so if you could send me a makefile which nmake
    understands i will continue with the debugging.

    as i did not receive any further answers to my request
    therefore there is no progress yet.

    have a nice day.

     
  • Sam Steingold

    Sam Steingold - 2002-09-30

    msvc nmake debug makefile

     
  • Sam Steingold

    Sam Steingold - 2002-09-30

    Logged In: YES
    user_id=5735

    1. it's Makefile.devel, you should be able to do
    > make -f Makefile.devel win32msvc/makefile.msvc5
    2. I generated and attached the debugging makefile, please
    try it.

    thanks.

     
  • Christian Schuhegger

    Logged In: YES
    user_id=598327

    after some time i finally managed to allocate some time for
    this bug test. i do not have a compilation environment to
    compile clisp anymore, but i managed to reproduce the bug in
    three lines of code:

    (defun bug-produce ()
    (values-list (loop for i from 1 to 140 collect
    i)))

    with the following result:

    [11]> (bug-produce)
    *** - handle_fault error2 ! address = 0x4007 not in
    [0x1BE30000,0x1BEF5940) !
    SIGSEGV cannot be cured. Fault address = 0x4007.

    that's all i can do for you at the moment. have a nice day.

     
  • Sam Steingold

    Sam Steingold - 2002-10-15

    Logged In: YES
    user_id=5735

    thank you for your bug report.
    the bug has been fixed in the CVS tree.
    you can either wait for the next release (recommended)
    or check out the current CVS tree (see http://clisp.cons.org\)
    and build CLISP from the sources (be advised that between
    releases the CVS tree is very unstable and may not even build
    on your platform).

     
  • Sam Steingold

    Sam Steingold - 2002-10-15
    • status: open --> closed-fixed
     

Log in to post a comment.