Bill Allombert on Fri, 13 May 2016 12:53:09 +0200


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

Re: Segfault on Cygwin64 when parisizemax > 4GB


On Fri, May 13, 2016 at 11:17:53AM +0200, Jeroen Demeyer wrote:
> Dear PARI developers,
> 
> While trying Sage on 64-bit Cygwin, we got a segfault in a cgetr()
> call during Sage startup. It turns out that the bug is actually in
> the mmap() implementation of Cygwin and it happens whenever
> parisizemax is larger than 4GB. The Cygwin bug is reported at
> https://cygwin.com/ml/cygwin/2016-05/msg00140.html

Thanks!

We investigated this at Atelier PARI/GP 2015 (not 2016!)
<http://pari.math.u-bordeaux.fr/wiki/Atelier%202015#windows-port>
and I have made a branch  bill-disable-mmap which allow to disable
mmap by doing ./Configure --disable-mmap.
Note that this does not disable parisizemax support, only the delayed
allocation feature, which the OS can emulate throught overcommit.

However it seems cygwin mmap support is improving since in 2015
it did not work even for parisizemax < 4GB.

> Perhaps PARI should add a workaround for this bug, for example
> putting a cap on parisizemax on Cygwin?

Capping parisizemax will cause problem when the issue is fixed.
If we are to trust the bug report, the fix to cygwin is rather easy.

Cheers,
Bill.