
The export names are saved as StringRefs pointing into the COFF directives. In the case of LTO objects, this can be memory allocated that is owned by the LTO InputFile, which gets destructed when doing the compilation. In the case of LTO objects from an older version of LLVM, which require being upgraded when loaded, the directives string gets destructed, while when using LTO objects of a matching version (the common case), the directives string points into memory that doesn't get destructed on LTO compilation. Test this by linking a bundled binary LTO object file, from an older version of LLVM. This fixes issue #78591, and downstream issue https://github.com/mstorsjo/llvm-mingw/issues/392.
2.3 KiB
2.3 KiB