rust/compiler
Wesley Wiser 76e6681b1f Dispose llvm::TargetMachines prior to llvm::Context being disposed
If the TargetMachine is disposed after the Context is disposed, it can
lead to use after frees in some cases.

I've observed this happening occasionally on code compiled for
aarch64-pc-windows-msvc using `-Zstack-protector=strong` but other users
have reported AVs from host aarch64-pc-windows-msvc compilers as well.

(cherry picked from commit 3323e4dc04e57cc64ac77dbff2f6bf50ac6832f0)
2023-11-30 16:53:42 -08:00
..