I've built Sage 64-bit on OpenSolaris but it crashes at startup. I've run gdb and find the bit of code that's causing the crash is this.

./devel/sage-main/sage/symbolic/function.cpp


 /* "sage/symbolic/function.pyx":109
 *                 raise ValueError,  real_fname + " parameter must be callable"
 *
 *         if not self._is_registered():             # <<<<<<<<<<<<<<
 *             self._register_function()
 *
 */


 commenting out the next few lines of
./devel/sage-main/sage/symbolic/function.cpp

/* __pyx_t_2 = ((struct __pyx_vtabstruct_4sage_8symbolic_8function_Function *)((struct __pyx_obj_4sage_8symbolic_8function_Function *)__pyx_v_self)->__pyx_vtab)->_is_registered(((struct __pyx_obj_4sage_8symbolic_8function_Function *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_6);
*/

allows Sage to run. It's not 100% stable, but much better than before.

This comes from:

./devel/sage-main/build/sage/symbolic/function.pyx (around line 109)

#
######        if not self._is_registered():
######            self._register_function()
######
######            global sfunction_serial_dict
######            sfunction_serial_dict[self._serial] = self
#

Can anyone see if there might be something wrong with this code, which is causing Sage to segfault?

I've not tied it down to a specific line yet, but just removed everything under the 'if' statement.

Why when I edit the .pyx file and type

./sage -b

does it not rebuild the C++ code? I ended up having to edit the C++ manually to comment out the lines causing the crash.

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Dave

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to