Bill Allombert on Fri, 23 Jun 2017 09:53:47 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: GMP memory allocation and Macaulay2 (cont.)


On Wed, Jun 21, 2017 at 04:33:12PM -0400, Doug Torrance wrote:
> Hello!
> A while ago [1], I inquired about an segfaults when Macaulay2 is linked
> against both PARI and GMP due to memory allocation issues.
> 
> Note that I tried using the new-ish INIT_noINTGMPm option to pari_init_opts
> when calling from Macaulay2 to no avail.
> 
> I promised a backtrace to help identify the problem, but am only now getting
> around to it.
> 
> Here is the output from gdb:
> (gdb) bt
> #0  __GI___libc_free (mem=0xfffffffffffffff8) at malloc.c:2966
> #1  0x00007ffff40be12f in pari_var_close ()
>    from /usr/lib/x86_64-linux-gnu/libpari-gmp-tls.so.5
> #2  0x00007ffff4102d7c in pari_close_opts ()
>    from /usr/lib/x86_64-linux-gnu/libpari-gmp-tls.so.5

Hello Doug, I found a potential bug in pari_close_opts().

Could you try to comment out the call to pari_kernel_close() in
pari_close_opts() ?

Cheers,
Bill.