[PATCH] D58641: [winasan] Unpoison stack memory when threads exit (redux)

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 25 15:57:49 PST 2019


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm

Thanks for asking about the test, but honestly it's quite a lot of trouble for me to reproduce that build configuration. If you commit it, we'll know if it works by tomorrow, and I won't have to do anything.

If this approach doesn't work going forward, my next idea would be to unpoison the thread stack during thread creation. We already have a CreateThread interceptor that wraps thread startup, so this wouldn't be too hard.



================
Comment at: asan_win.cc:366
+
+#pragma section(".CRT$XLZ", long, read)  // NOLINT
+__declspec(allocate(".CRT$XLZ")) void (NTAPI *__asan_tls_exit)(void *,
----------------
Let's use `.CRT$XLX` or Y instead. There is no guarantee that this XLZ section sorts before the XLZ section that the is used to find the bounds for thread destructors.


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58641/new/

https://reviews.llvm.org/D58641





More information about the llvm-commits mailing list