Skip to content

Refactor ras-report.c to fix dangerous stack allocations#249

Open
pohaosu wants to merge 1 commit into
mchehab:masterfrom
pohaosu:fix/stack-allocations
Open

Refactor ras-report.c to fix dangerous stack allocations#249
pohaosu wants to merge 1 commit into
mchehab:masterfrom
pohaosu:fix/stack-allocations

Conversation

@pohaosu

@pohaosu pohaosu commented May 13, 2026

Copy link
Copy Markdown

Replace large stack allocations (1MB in commit_report_backtrace and 4MB in report functions) with dynamic memory allocation (malloc/free) to prevent stack overflow crashes, especially in thread contexts.

Introduce commit_report_common helper to consolidate reporting logic, which also reduces code duplication by ~700 lines.

Replace large stack allocations (1MB in commit_report_backtrace and
4MB in report functions) with dynamic memory allocation (malloc/free)
to prevent stack overflow crashes, especially in thread contexts.

Introduce commit_report_common helper to consolidate reporting logic,
which also reduces code duplication by ~700 lines.

Signed-off-by: Phineas Su <pohaosu@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant