Skip to content

[libc][startup] fix main thread TLS unmapped with wrong value #102009

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

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libc/startup/linux/do_start.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static ThreadAttributes main_thread_attrib;
// We register the cleanup_tls function to be the last atexit callback to be
// invoked. It will tear down the TLS. Other callbacks may depend on TLS (such
// as the stack protector canary).
atexit([]() { cleanup_tls(tls.tp, tls.size); });
atexit([]() { cleanup_tls(tls.addr, tls.size); });
// We want the fini array callbacks to be run after other atexit
// callbacks are run. So, we register them before running the init
// array callbacks as they can potentially register their own atexit
Expand Down
Loading