Skip to content

Remove unreachable OOM handling - #577

Open
azkrishpy wants to merge 3 commits into
todosfrom
todo/remove-oom-handling
Open

Remove unreachable OOM handling#577
azkrishpy wants to merge 3 commits into
todosfrom
todo/remove-oom-handling

Conversation

@azkrishpy

Copy link
Copy Markdown
Contributor

Issue #, if available: N/A

Description of changes:

The CRT allocators abort on failure rather than returning NULL — aws_mem_acquire,
aws_mem_calloc and aws_mem_acquire_many all route through AWS_PANIC_OOM, which is an
unconditional exit(-1). The OOM branches guarded by these checks were therefore unreachable.

Removes those checks and the error paths behind them, and folds a few acquire-then-zero pairs
into aws_mem_calloc. No assert is added in their place: it would be dead in debug and compiled
out in release, since the abort happens before control returns.

No behavior change. No new tests — the existing suite covers these paths and passes unchanged (745).

Part of the todos stack (#576). Base is todos, not main.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@azkrishpy
azkrishpy requested a review from a team as a code owner September 1, 2026 20:49
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.94%. Comparing base (da2a213) to head (275b769).

Files with missing lines Patch % Lines
source/proxy_connection.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            todos     #577      +/-   ##
==========================================
+ Coverage   79.84%   79.94%   +0.10%     
==========================================
  Files          28       28              
  Lines       12105    12086      -19     
==========================================
- Hits         9665     9662       -3     
+ Misses       2440     2424      -16     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@azkrishpy azkrishpy added the patch ABI backward-compatible (patch release) label Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch ABI backward-compatible (patch release)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants