Skip to content

Stable MIR's thread local not properly handled on unwind #112940

Closed
@programmerjake

Description

@programmerjake

f();
TLV.replace(std::ptr::null_mut());

TLV is left set to a dangling pointer if f unwinds. This is unsound because a later call to with will use that dangling pointer. There is a similar issue with with and unwinding.

since you're on the Stable MIR cc list:
cc @oli-obk, @celinval

Metadata

Metadata

Assignees

Labels

E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions