[PATCH] D142949: [lld] Destroy CommonLinkerContext inside lld::*::link after D108850
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 05:35:42 PST 2023
aganea added a comment.
In D142949#4093346 <https://reviews.llvm.org/D142949#4093346>, @aganea wrote:
> The reason for //not// allocating `ctx` on the stack is to survive calls to `lld::error()` in LLD-as-lib scenarios.
Just another quick note -- in theory we can survive crashes as well here. But there's at least a case in lldELF which throws an `error()` inside a constructor, and that corrupts the heap on `ctx` deletion, on Windows at least, see rG45b8a741fbbf271e0fb71294cb7cdce3ad4b9bf3 <https://reviews.llvm.org/rG45b8a741fbbf271e0fb71294cb7cdce3ad4b9bf3>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142949/new/
https://reviews.llvm.org/D142949
More information about the llvm-commits
mailing list