[PATCH] D22471: [compiler-rt] Allow trampoline allocation further and 1 gig.

Etienne Bergeron via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 12:32:15 PDT 2016


etienneb created this revision.
etienneb added a reviewer: rnk.
etienneb added subscribers: chrisha, wang0109, llvm-commits.

The trampoline allocation limits the memory scanning to 1 gig.
There is an unittest that is allocating a large object which make
it impossible to the trampoline allocator to find a free spot.

see shadow_mapping_failures:
```
char bigchunk[1 << 30];
```

This patch is not fixing the unittest but it's fixing it's infinite
loop behavior.

https://reviews.llvm.org/D22471

Files:
  lib/interception/interception_win.cc

Index: lib/interception/interception_win.cc
===================================================================
--- lib/interception/interception_win.cc
+++ lib/interception/interception_win.cc
@@ -294,7 +294,7 @@
   uptr max_size;
 };
 
-static const uptr kTrampolineScanLimitRange = 1 << 30;  // 1 gig
+static const uptr kTrampolineScanLimitRange = 1 << 31;  // 2 gig
 static const int kMaxTrampolineRegion = 1024;
 static TrampolineMemoryRegion TrampolineRegions[kMaxTrampolineRegion];
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22471.64361.patch
Type: text/x-patch
Size: 491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160718/169376f3/attachment.bin>


More information about the llvm-commits mailing list