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

Fix running Super Mario when built with GCC 11 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gunnarbeutner
Copy link

Super Mario crashes when built with GCC 11. It seems that GCC re-orders the static initializers in a way that break assumptions made in Music::Music. Here's the stack trace I got:

CrashDaemon(15): New coredump file: /tmp/coredump/uMario_27_1619674230
CrashDaemon(15): --- Backtrace for thread #0 (TID 27) ---
CrashDaemon(15): 0x6b2360a8: [/opt/Super_Mario/uMario] Music::Music() +0x50
CrashDaemon(15): 0x6b1bd4e6: [/opt/Super_Mario/uMario] __static_initialization_and_destruction_0(int, int) +0xb6
CrashDaemon(15): 0x6b1bd594: [/opt/Super_Mario/uMario] _GLOBAL__sub_I__ZN4CCFGC2Ev +0x1f```

This PR changes how those singletons are initialized.

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

Successfully merging this pull request may close these issues.

1 participant