#1043 scanmap stack overflow

open
nobody
Lisp Core (471)
7
2006-12-26
2006-12-18
No

scanmap(polarform,[%i]) coredumps: "unknown software exception 0xc00000fd occurred at location 0x00608df4.

Same thing for scanmap(polarform,1+%i).

Though this must reflect a problem in Maxima (infinite recursion?), it also seems to reflect a problem in GCL (not handling stack overflow gracefully?).

Maxima 5.10.0 GCL 2.6.8 Windows 2000 Athlon

Discussion

  • Robert Dodier

    Robert Dodier - 2006-12-19

    Logged In: YES
    user_id=501686
    Originator: NO

    The immediate problem is that SCANMAP1 (src/comm2.lisp) calls itself on the result of applying SCANMAP1. Since polarform(%i) => exp(%i*%pi/2) which contains %i, that causes a bottomless recursion.

    Aside from polarform, it seems like any function which yields an expression containing the original expression has the potential for causing stack overflow.

    Here is a definition of scanmap which (I hope) avoids stack overflow.

    new-scanmap has this effect: apply old-scanmap with 1st argument = gensym, then substitute new-scanmap 1st argument for gensym and evaluate.

    Comments?

    For the record:

    scanmap(polarform, [%i], bottomup) => [%i] (which seems incorrect; should be [exp(%i*%pi/2)] instead)

    Clisp 2.39 + Maxima 5.10.99rc2 + scanmap(polarform,[%i]) => stack overflow

    SBCL 1.0 + Maxima 5.10.99rc2 + scanmap(polarform,[%i]) => "Control stack exhausted (no more space for function call frames)"

     
  • Robert Dodier

    Robert Dodier - 2006-12-26

    Logged In: YES
    user_id=501686
    Originator: NO

    Attempt greater accuracy in summary (problem is not GCL-specific).

     
  • Robert Dodier

    Robert Dodier - 2006-12-26
    • summary: scanmap coredumps (GCL) --> scanmap stack overflow
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks