#6391: libGAP!  -- create a Cython library interface to gap
----------------------------------------------------------------------------+
       Reporter:  was                                                       |   
      Owner:  was                                                     
           Type:  enhancement                                               |   
     Status:  needs_review                                            
       Priority:  major                                                     |   
  Milestone:  sage-5.3                                                
      Component:  group theory                                              |   
 Resolution:                                                          
       Keywords:                                                            |   
Work issues:                                                          
Report Upstream:  N/A                                                       |   
  Reviewers:  Dima Pasechnik, Ivan Andrus, Volker Braun, William Stein
        Authors:  Dima Pasechnik, Ivan Andrus, Volker Braun, William Stein  |   
  Merged in:                                                          
   Dependencies:  #13211                                                    |   
   Stopgaps:                                                          
----------------------------------------------------------------------------+

Comment (by dimpase):

 Replying to [comment:113 vbraun]:
 > Your changes look fine. The `test/main.c` example doesn't do proper
 error handling, so you shouldn't expect a useful error message. For a
 relevant stack backtrace you need to post what happens before you get into
 the error loop.

 Well, I rebuilt libgap with SAGE_DEBUG on, and I can see it starting the
 interpreter interaction, parsing the input, calling gasman, then something
 goes wrong, it tries to print the message {{{"Variable: 'FreeGroup' must
 have a value"}}}
 {{{

 (gdb)
 libGAP_SPrTo (buffer=0x7fffffffd0d0 "Variable: 'FreeGroup' must have a
 value", maxlen=120,
     format=0x7ffff7750098 "Variable: '%s' must have a value",
 arg1=140733014557528, arg2=0)
     at scanner.c:3049
 }}}
 then I see
 {{{
 (gdb)
 libGAP_SyStrncat (dst=0x7fffffffcd20 "justQuit", src=0x7ffff775e32c
 "justQuit", len=1023)
     at system.c:682

 (gdb)
 libGAP_RNamName (name=0x7ffff775e32c "justQuit") at records.c:110
 }}}
 and it tries to go further. Eventually I see
 {{{
 (gdb)
 libGAP_ErrorQuit (msg=0x7ffff77472a0 "Variable: <<unknown>> must have an
 assigned value", arg1=0,
     arg2=0) at gap.c:1451
 (gdb)
 libGAP_CallErrorInner (msg=0x7ffff77472a0 "Variable: <<unknown>> must have
 an assigned value",
     arg1=0, arg2=0, justQuit=1, mayReturnVoid=0, mayReturnObj=0,
 lateMessage=0x7ffef510a678,
     printThisStatement=1) at gap.c:1430

 }}}

 this gets repeated many times (buffer corruption), and eventually a
 segfault.
 {{{
 Program received signal SIGSEGV, Segmentation fault.
 0x00007ffff75a8eef in libGAP_RNamName (name=Cannot access memory at
 address 0x7fffff7fefa8
 ) at records.c:79
 }}}

 the trouble starts of course much earlier, before it fails to recognize
 {{{FreeGroup}}} as a valid GAP function...




 .

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6391#comment:115>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to