This is an archive of the discontinued LLVM Phabricator instance.

Updated DynamicLibrary test to support static linking against MSVC RT.
Needs ReviewPublic

Authored by ivankara on Dec 14 2018, 2:59 AM.

Details

Summary

In this test we allocate memory in executable, reallocate memory in library and trying to release memory in executable.
Static linking standard library against both executable and library file leads to allocators conflict. Each target has its own allocator which doesn't know about existence of the other.
This patch avoids allocating memory in library.

Diff Detail

Event Timeline

ivankara created this revision.Dec 14 2018, 2:59 AM

Can anyone review this code?

Sorry for the tardiness of this...

  1. Could the the type change from std::string be to the new State type introduced (rather than int)
  2. Have all State variables default initialized to a value that would cause the test to fail.
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2019, 5:20 PM
Herald added a subscriber: dexonsmith. · View Herald Transcript

I'll make changes according your comment a little bit later. Right now I don't have proper environment and time.