tsan: fix mmap_lots test

If tsan runtime will try to allocate something during exit handling,
the allocation will fail because there is no VA whatsoever.
It's observed to fail with the following error in some cases:
failed to allocate 0x1000 (4096) bytes of DTLS_NextBlock.
So terminate the process immediately.

Reviewed-in: https://reviews.llvm.org/D96874
GitOrigin-RevId: fb19400d4e4c421ce61907bf92a92be8d937e584
diff --git a/test/tsan/mmap_lots.cpp b/test/tsan/mmap_lots.cpp
index e1e8ac1..a397de0 100644
--- a/test/tsan/mmap_lots.cpp
+++ b/test/tsan/mmap_lots.cpp
@@ -24,6 +24,12 @@
     fprintf(stderr, "allocated %zu with size %zu\n", allocated, mmap_size);
   }
   fprintf(stderr, "DONE\n");
+  // If tsan runtime will try to allocate something during exit handling,
+  // the allocation will fail because there is no VA whatsoever.
+  // It's observed to fail with the following error in some cases:
+  // failed to allocate 0x1000 (4096) bytes of DTLS_NextBlock.
+  // So terminate the process immediately.
+  _exit(0);
 }
 
 // CHECK: DONE