Skip to content

Remove unreachable OOM handling - #577

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

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

Conversation

@azkrishpy

@azkrishpy azkrishpy commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Issue #, if available: N/A

Description of changes:

CRT allocators abort on failure rather than returning NULL. They route through AWS_PANIC_OOM, an unconditional exit(-1), so every OOM branch guarded by a NULL check was unreachable.

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

No behavior change. Existing suite passes unchanged.

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

codecov-commenter commented Sep 3, 2026

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.85%. Comparing base (b32d9ee) to head (6bea455).

Files with missing lines Patch % Lines
source/proxy_connection.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            todos     #577      +/-   ##
==========================================
- Coverage   80.02%   79.85%   -0.18%     
==========================================
  Files          28       28              
  Lines       12105    12081      -24     
==========================================
- Hits         9687     9647      -40     
- Misses       2418     2434      +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
@azkrishpy
azkrishpy force-pushed the todo/remove-oom-handling branch from 275b769 to 374b7e9 Compare September 8, 2026 14:39
@azkrishpy
azkrishpy force-pushed the todo/remove-oom-handling branch from f733960 to 6bea455 Compare September 9, 2026 22:25
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