-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
[GCC 7.2.0] -Ofast causes segfault #142
Comments
This is what gdb tells me: Program received signal SIGSEGV, Segmentation fault. |
Strange, I haven't seen this with GCC 6.3 at least (which is what Stretch comes with). |
@solskogen I tried again today with the current sdl1-dev branch, can't recreate this on Stretch. Maybe it's related to something in the newer version of GCC? Some flag that messes things up? |
Yes, it has probably something to do with GCC (and not Arch Linux as such) |
@solskogen Does this still occur with the latest "dev" branch changes? If so, I'll have to set up an Arch image and test it there, since I can't recreate it under Stretch and the GCC bundled with it. |
Yes, it still do. |
Here's the output from gdb and a clean build (no config files or kickstart files configured) Thread 1 "amiberry-sdl1-d" received signal SIGSEGV, Segmentation fault. |
oh.. Funny development! If I copy kickstart files into kickstart/ and then start amiberry, it works. If I remove then again, it segfaults. |
Thanks, that actually helps in investigating this further... Then it's not related to the GCC version at all? |
Well, yes and no. |
With some help from some extra flags (-fsanitize=bool) I get this from GDB: Thread 1 "amiberry-sdl1-d" received signal SIGSEGV, Segmentation fault. |
[Thread 0x69dff420 (LWP 19183) exited]==19180==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7efff87e at pc 0x007d0828 bp 0x7efff764 sp 0x7efff750 Address 0x7efff87e is located in stack of thread T0 at offset 158 in frame This frame has 2 object(s): |
On ArchLinux ARM (at least) if -Ofast is used, amiberry will segfault. Changing that to -O2 makes the problem go away.
gcc/g++ is version 7.2.0. (I tried using sdl1-branch)
The text was updated successfully, but these errors were encountered: