<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56617>56617</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Several sanitizer_common allocator tests require excessive VM
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            vitalybuka
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          rorth
      </td>
    </tr>
</table>

<pre>
    On the [Solaris/sparcv9 buildbot](https://lab.llvm.org/staging/#/builders/50), several 64-bit allocator tests `FAIL` on and off.  E.g.
```
[ RUN      ] SanitizerCommon.SizeClassAllocator64PopulateFreeListOOM
SanitizerTool: Out of memory. The process has exhausted 32768MB for size class 12884901888.
p[0] 70a800000000 s = 100000000
==29632==ERROR: SanitizerTool failed to allocate 0x100000000 (4294967296) bytes of memory at address 0x70a900000000 (error code: 11)
[...]
SanitizerTool: CHECK failed: sanitizer_common.cpp:61 "((0 && "unable to mmap")) != (0)" (0x0, 0x0) (tid=1)
```
```
[ RUN      ] SanitizerCommon.CombinedAllocator64
==29634==WARNING: SanitizerTool: CombinedAllocator allocation overflow: 0xffffffffffffffff bytes with 0x1 alignment requested
==29634==WARNING: SanitizerTool: CombinedAllocator allocation overflow: 0xffffffffffffffff bytes with 0x400 alignment requested
==29634==WARNING: SanitizerTool: LargeMmapAllocator allocation overflow: 0x2000 bytes with 0x1 alignment requested
==29634==WARNING: SanitizerTool: LargeMmapAllocator allocation overflow: 0x2000 bytes with 0x400 alignment requested
==29634==WARNING: SanitizerTool: CombinedAllocator allocation overflow: 0xfffffffffffffc00 bytes with 0x400 alignment requested
==29634==WARNING: SanitizerTool: CombinedAllocator allocation overflow: 0xffffffffffffffff bytes with 0x1 alignment requested
==29634==ERROR: SanitizerTool failed to allocate 0x102000 (1056768) bytes of LargeMmapAllocator (error code: 11)
==29634==Process memory map follows:
[...]  
==29634==End of process memory map.
SanitizerTool: CHECK failed: sanitizer_common.cpp:61 "((0 && "unable to mmap")) != (0)" (0x0, 0x0) (tid=1)
```
```
[ RUN      ] SanitizerCommon.LargeMmapAllocator
==29630==ERROR: SanitizerTool failed to allocate 0x1000a000 (268476416) bytes of LargeMmapAllocator (error code: 11)
[...]
SanitizerTool: CHECK failed: sanitizer_common.cpp:61 "((0 && "unable to mmap")) != (0)" (0x0, 0x0) (tid=1)
```
The buildbot in question has 32 GB RAM and (now) 48 GB swap.  However, apparently like Windows, Solaris doesn't support over-committing VM, so depending on other tests running in parallel, VM is exhausted and the tests (at least
```
  SanitizerCommon.SizeClassAllocator64PopulateFreeListOOM
  SanitizerCommon.CombinedAllocator64
  SanitizerCommon.LargeMmapAllocator
```
, maybe more) can `FAIL` randomly.  I wonder how best to handle this?  Skip the tests as on Windows, define ` ALLOCATOR64_SMALL_SIZE` or something else?
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzlV9tu4zYQ_Rr5ZRBBomRZevCDYye7QeN4Yae7QF8CShpbbChRFak47td3qMiJ4ySL3c0WbVFDsC4kZ85ceZiqfDdeVGAKBGd4ulKSN0I77FzXvMnuEkhbIfNUGWc4c1hcGFNrJ5jQBLokT10p70pXNRu7xPCNqDbdWED_3VJsrLSh57DEYVPQeIcNlxCFJ6kwwKVUGTeqAYPaaHAi73xycUk3UBXwKge1XrsAZ-7GdbyZ401oqL8eXoensPz1CrofYYQVr4QRf2IzVWWpKndFz1PJtZ7sVUXhJ1W3khs8bxAvhTaLxfxB2uPia6UkmQmL1hACKLFUzc6Fa_JS3agMtYaCa8D7grfaYA4BG0Xx_BTWZIomCZBZneCzOA4Tz4_juMdfE2LPAh15PPb6H5DlwQz8_XtvWzCjiyVRwB4ez5bLxdLCeoYT1lxIgmDU3p0I3v2jLKCwhSwJk2hEoigMkO7I2U9mAac45HljjfLuCVZyuBSbhkzKVI5Wse_bOO4977quTYvXXTf9eDb9pcdm3_V-wk32EJmsrul75JMWRoros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