Skip to content

gh-145792: Fix incorrect alloca allocation size in traceback.c#145814

Open
VanshAgarwal24036 wants to merge 3 commits intopython:mainfrom
VanshAgarwal24036:gh-145792-fix-traceback-alloca
Open

gh-145792: Fix incorrect alloca allocation size in traceback.c#145814
VanshAgarwal24036 wants to merge 3 commits intopython:mainfrom
VanshAgarwal24036:gh-145792-fix-traceback-alloca

Conversation

@VanshAgarwal24036
Copy link
Contributor

@VanshAgarwal24036 VanshAgarwal24036 commented Mar 11, 2026

Fix incorrect memory allocation when using the VLA fallback macro in traceback.c with alloca(). The previous implementation allocated only size bytes instead of sizeof(type) * size, which could lead to out-of-bounds access.

A regression test and NEWS entry are included.

@VanshAgarwal24036
Copy link
Contributor Author

@vstinner Please review it when you are free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants