Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nef.x segfaults on Cygwin #13960

Closed
jpflori opened this issue Jan 16, 2013 · 15 comments
Closed

nef.x segfaults on Cygwin #13960

jpflori opened this issue Jan 16, 2013 · 15 comments

Comments

@jpflori
Copy link
Contributor

jpflori commented Jan 16, 2013

On my Windows 7 x64 install of 5.6.rc0 I get segfaults in nef.x.

After rebuilding with CFLAGS="-g -O0" I get the following backtrace

Program received signal SIGSEGV, Segmentation fault.
__chkstk_ms () at ../../../src/libgcc/config/i386/cygwin.S:173
173     ../../../src/libgcc/config/i386/cygwin.S: No such file or directory.
(gdb) bt
#0  __chkstk_ms () at ../../../src/libgcc/config/i386/cygwin.S:173
#1  0x004320e5 in part_nef (_P=0x686a0008, _V=0x20064a38, _E=0x20064b40,
    _OUT_PTL=0x6b470008, _codim=0x280c0c, _F=0x22fb7c) at Nefpart.c:774
#2  0x0042e421 in Make_E_Poly (outFILE=0x61187720, _W=0x280de8,
    _CP=0x7c1e0008, _CV=0x2003a0d0, _CE=0x2003a1d8, _codim=0x280c0c,
    _F=0x28ab70, _D=0x280c10) at E_Poly.c:1327
#3  0x00402061 in main (narg=2, fn=0x28ac40) at nef.c:291

on the file

$ cat ../nef.bug
3 6
 1  0  0 -1  0  0
 0  1  0  0 -1  0
 0  0  1  0  0 -1

To fix this, we need to specify the stack size explicitly on Cygwin. This is done in the updated spkg.

install http://boxen.math.washington.edu/home/jpflori/palp-2.1.p1.spkg

CC: @kcrisman @vbraun

Component: packages: standard

Keywords: palp nef.x cygwin segfault

Author: Dmitrii Pasechnik

Reviewer: Jean-Pierre Flori

Merged: sage-5.8.beta0

Issue created by migration from https://trac.sagemath.org/ticket/13960

@jpflori jpflori added this to the sage-5.7 milestone Jan 16, 2013
@jpflori
Copy link
Contributor Author

jpflori commented Jan 16, 2013

comment:1

It seems the stack is too small.
Recompiling with CFLAGS including -Wl,--stack,10000000 (so 10MB) makes the crash disappear.
I guess the best solution would to malloc the problematic stuff on the heap.

@vbraun
Copy link
Member

vbraun commented Jan 16, 2013

comment:2

Thats a known issue in PALP, everything is done with static sizes for maximal speed.

@jpflori
Copy link
Contributor Author

jpflori commented Jan 16, 2013

comment:3

Ok so we'll use the --stack fix.
Any suggestion on a sensible size?

@vbraun
Copy link
Member

vbraun commented Jan 16, 2013

comment:5

Why isn't the Cygwin stack 8MB by default, this seems to be a pretty popular value in the Linux world.

@jpflori
Copy link
Contributor Author

jpflori commented Jan 16, 2013

comment:6

No idea, I'll use 8MB then.

@dimpase
Copy link
Member

dimpase commented Jan 27, 2013

comment:7

I've made the spkg where I put this 8MB stack fix for Cygwin in, please test!

@dimpase

This comment has been minimized.

@jpflori
Copy link
Contributor Author

jpflori commented Feb 7, 2013

comment:8

There is a typo in the hg commit message, and find funny the quoting you used in spkg-install when adding the necessary magic to CFLAGS.
Is that on purpose?

@dimpase
Copy link
Member

dimpase commented Feb 7, 2013

comment:9

Replying to @jpflori:

There is a typo in the hg commit message, and find funny the quoting you used in spkg-install when adding the necessary magic to CFLAGS.
Is that on purpose?

none of it is intentional – but it works.

@jpflori
Copy link
Contributor Author

jpflori commented Feb 11, 2013

Spkg diff, for review only.

@jpflori
Copy link
Contributor Author

jpflori commented Feb 11, 2013

Author: Dmitrii Pasechnik

@jpflori
Copy link
Contributor Author

jpflori commented Feb 11, 2013

comment:10

Attachment: palp-2.1.p1.diff.gz

Here comes a reviewer version of the spkg.
Fixed typos mentioned above, have tested this works as expected, everything looks clean.
I'm putting this as positive review.

@jpflori

This comment has been minimized.

@jpflori
Copy link
Contributor Author

jpflori commented Feb 11, 2013

Reviewer: Jean-Pierre Flori

@jdemeyer
Copy link
Contributor

Merged: sage-5.8.beta0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants