[cfe-dev] Question about Clang/LLVM addresssanitizer

James Knight via cfe-dev cfe-dev at lists.llvm.org
Wed Sep 21 20:23:07 PDT 2016


> On Sep 20, 2016, at 9:47 PM, ZhaoKang via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> You mentioned that 'Some global settings in the system may for some reason reject such huge mappings.'
> And I want to know which kinds of settings may have this effect?

cat /proc/sys/vm/overcommit_memory on your system.

The default value is 0, which means allow overcommit heuristically when it seems likely to work. 

If, however, your system has that set to 2 (which I'm guessing it does), linux will ignore the MAP_NORESERVE flag, and *always* demands you have enough ram and swap to hold everything that might ever possibly be written.

In that case, either set it back to 0, or else add 16TB or so of swapspace to your system.

Almost nobody ever sets that option to 2, because it's almost completely useless to do so, and just breaks stuff. :)


More information about the cfe-dev mailing list