[llvm-bugs] [Bug 34456] New: DynamicLibrary Shutdown unit test crashes when built with /MTd
llvm-bugs at lists.llvm.org
Mon Sep 4 06:48:30 PDT 2017
Bug ID: 34456
Summary: DynamicLibrary Shutdown unit test crashes when built
OS: Windows NT
Component: Support Libraries
Assignee: unassignedbugs at nondot.org
Reporter: jh7370.2008 at my.bristol.ac.uk
CC: llvm-bugs at lists.llvm.org
In DynamicLibraryTest.cpp, the unit test "Shutdown" crashes if building with
Visual Studio and the cmake variable "LLVM_USE_CRT_DEBUG" is set to /MTd.
The problem appears to be that in this mode, allocating in the main
executable's heap and destroying from the DLL (or vice versa) is not allowed.
During the test, a vector owned by the main executable is resized by the DLL,
resulting in the crash as it deallocates the original vector element.
I attempted to reserve space in the vector to fix the issue, but then the
copying of the string within push_back (called during the Global destructor in
PipSqueak) resulted in a memory allocation in the DLL, leading to a crash when
destroying the vector in the main executable.
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs