k8ika0s opened a new pull request, #49281:
URL: https://github.com/apache/arrow/pull/49281

   Closes #49280
   
   ## Summary
   
   This PR makes synthetic OOM unit tests allocator-stable when mimalloc is 
active.
   
   It updates:
   - `cpp/src/arrow/buffer_test.cc`
   - `cpp/src/arrow/memory_pool_test.h`
   
   ## Problem
   
   These tests intentionally request extremely large allocations to force 
`OutOfMemory`.
   Using near-`max` bounds can hit allocator-specific fatal behavior 
(especially with mimalloc)
   before Arrow returns a normal OOM status, making tests environment-dependent.
   
   ## What changed
   
   1. In `ResizeOOM` and `TestOOM`, detect mimalloc backend and `GTEST_SKIP()` 
synthetic OOM assertions.
   2. Clamp synthetic huge allocation upper bound to `1 << 48` (256 TB), which 
is still impossible in practice but avoids extreme allocator boundary paths.
   3. Keep existing alignment-overflow guard (`-63`) and 
`ASSERT_RAISES(OutOfMemory, ...)` logic for non-mimalloc backends.
   
   ## Why this approach
   
   - Scope is intentionally minimal and test-only.
   - Preserves the goal of OOM-path coverage where behavior is reliable.
   - Removes allocator-fatal coupling from CI/unit-test expectations.
   
   ## Risk / Compatibility
   
   - No runtime library behavior change.
   - No API/ABI impact.
   - Test behavior only.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to