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

[MinGW/Clang] Fix SEGFAULTs when logging to globals #95

Closed
wants to merge 2 commits into from
Closed

[MinGW/Clang] Fix SEGFAULTs when logging to globals #95

wants to merge 2 commits into from

Conversation

Amphaal
Copy link
Contributor

@Amphaal Amphaal commented May 4, 2020

Okay, I think I found the issue with mosra/magnum#417.

Changing few lines in src/Corrade/Utility/Debug.cpp allowed me to boot up a sample projet using a Magnum Clang build.

My 2cts guess here is that Clang does some optimizations and "hard stores" pointer addresses of the standard outputs when directly referenced "as it", references that may change outside of Corrade, resulting in SEGFAULTs when Magnum tries to use its logging capabilities.

@mosra mosra added this to the 2020.0a milestone May 4, 2020
@mosra mosra added this to TODO in Utility via automation May 4, 2020
Copy link
Owner

@mosra mosra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, nice. I have no idea how you managed to discover this :)

src/Corrade/Utility/Debug.cpp Show resolved Hide resolved
Co-authored-by: Vladimír Vondruš <mosra@centrum.cz>
@Amphaal
Copy link
Contributor Author

Amphaal commented May 4, 2020

Wow, nice. I have no idea how you managed to discover this :)

Luck and perseverance I guess... Classic MinGW developper's traits right here xD

@mosra
Copy link
Owner

mosra commented May 4, 2020

Merged as abfeeaf, thank you! (The CIs take ages to go through, sorry.)

@mosra mosra closed this May 4, 2020
Utility automation moved this from TODO to Done May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Utility
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants