If size > SizeClassMap::kMaxSize we should have enough space in red zone.
This also limits max allocation size to 2^45.
Paths 
  |  Differential  D86922  
[Asan] Don't use MetaData for size Changes PlannedPublic Authored by vitalybuka on Sep 1 2020, 2:59 AM. 
Details 
 Summary If size > SizeClassMap::kMaxSize we should have enough space in red zone. This also limits max allocation size to 2^45. 
Diff Detail 
 Event Timelinevitalybuka added a child revision: D86931: [Asan] Don't crash if metadata is not initialized.Sep 1 2020, 5:11 AM Comment Actions This patch changes how the allocator works, so I don't think it qualifies as NFC. 
 Comment Actions 
 According https://llvm.org/docs/Lexicon.html NFC is for "is a pure refactoring/cleanup". And definition of refactoring includes "without changing external behavior". Almost ANY refactoring involves changing of internal behavior.  
 vitalybuka removed a child revision: D86931: [Asan] Don't crash if metadata is not initialized.Sep 6 2020, 6:37 PM vitalybuka removed a parent revision: D86919: [NFC][Asan] Set AP32::kMetadataSize to 0.Sep 6 2020, 6:42 PM vitalybuka retitled this revision from [NFC][Asan] Don't use MetaData for size to [Asan] Don't use MetaData for size.Sep 8 2020, 1:10 PM 
Revision Contents 
 
 
Diff 289831 compiler-rt/lib/asan/asan_allocator.cpp
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
s/to/of