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
Segfault while building on i686 #2921
Comments
@remexre thanks for the report. Can you please try by passing |
It looks like I get the same result, including a very similar backtrace. |
Doing disas on the stack trace, looks like it crashes on |
OK, I will try to reproduce. |
@remexre I can build this under emulation inside a debian chroot with gcc 7.4. A few more questions:
|
It's a native 32-bit machine, yeah. cpuinfo
build log
|
There was no error on the build above though, was there? |
Oh, grr, looks like it didn't capture stderr; it segfaulted as before. |
ok - then, no problem. I have what I need. Thanks. |
I assume you are untarring the |
I'm also passing |
Thanks. I will need some more time to investigate. No problem is revealed in emulation. Maybe I can get my hands on a 32bit machine. |
I suspect reproducing this relies on the options your glibc was compiled with -- it looks like a stack alignment thing to me. |
@remexre Have you compiled your glibc with any special options? This should be pretty standard accross distros unless you have done it yourself. |
@remexre Although the stack is meant to be 16-byte aligned, it looks like there's one place where alignment is only enabled for Mac OS. Can you try changing line 420 of "src/racket/src/lightning/i386/core.h" from
to
and see whether that helps? |
I believe CFLAGS should be The change to lightning seems to have worked, though racket3m and racketcgc both have a multisecond time-to-repl; do you see a regression on your machine? |
@remexre If you run |
Or perhaps just completing |
That cut it down from ~10sec to ~3 |
Depending on which one you did, a full Also, what's the time for |
After the |
That's a time that seems within the realm of possibility for a slow machine (I get 0.277). |
Okay, this works to my satisfaction; should I close this, or is there some code change that should be landed (eg a configure option for alignment) |
Fix function-call setup to align the stack to a 16-byte boundary on all platforms.
No clue, but it'd be plausible to me that Ubuntu, Debian, Fedora, etc. compile their libc with unaligned stacks to prevent issues with software unaware of the ABI change. |
@remexre you're on the money here.
This is slightly unfortunate to say the least. @mflatt will close this one when he sees fit. |
Yes, c611f12 was meant to close the issue, but I forgot to mention the issue number in the commit. I'll close this issue now. |
On an i686 machine with glibc 2.29, gcc 8.3.0:
make cstartup
insrc/racket
of the 7.5 src+builtpkgs tarball:gdb --args ./racketcgc -cu ./src/compile-startup.rkt cstartup.inc cstartup.zo ./src/startup.inc ./src/schvers.h
:The text was updated successfully, but these errors were encountered: