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: avoid segfault at static destructors #638

Merged
merged 1 commit into from
Dec 17, 2023

Conversation

ThisALV
Copy link
Contributor

@ThisALV ThisALV commented Dec 17, 2023

The exit routine executed after main returned already calls libc_fini_array. Calling it again within __libnx_exit calls the destructor for static objects a second time which results in a segfault when static/global objects are used in a program.

@WinterMute WinterMute merged commit 7d68ad6 into switchbrew:master Dec 17, 2023
1 check passed
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.

2 participants