> 1) sage is using gmp.so and is linked to that before libecl.so is even > introduced. Thus, presumably sage is fully bound to libecl.so > 2) sage initializes some of its "gmp integer pool" > 3) upon "from sage.libs.ecl import *" I think libecl.so is "dlopen"-ed > by sage (or does that happen before the integer pool is created?) > 4) cl_boot() in libecl.so calls mp_set_memory_functions to set the > memory functions, presumably on the copy of libgmp.a that has been > included in the build of libecl.so (libecl.so is certainly not > advertising any dependencies on libgmp.so when I call ldd on it). > 5) I exit sage and get a segfault. The stack trace shows that > free_integer_pool called ecl_dealloc. This is evidence that cl_boot > called the mp_set_memory_functions that sage itself uses as well.
Excuse my ignorance, I am sure this was answered a long time ago but I can't find it right now: why don't you just steal the memory manager back from GMP, i.e. why does ECL require the GMP memory manager to use its garbage collected memory? Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://www.informatik.uni-bremen.de/~malb _jab: martinralbre...@jabber.ccc.de --~--~---------~--~----~------------~-------~--~----~ 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 URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---