Landing: ef7d69b3a91c
Project / Subsystem
gcc / gcc/i386
Date
2026-09-29
Author
Uros Bizjak
Commit
ef7d69b3a91c3b12a647ffca92e2553229f324dd
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/i386
- patch_id
- —
- commit_hash
- ef7d69b3a91c3b12a647ffca92e2553229f324dd
- source_type
- github
- headline
- i386: Fix va_arg access alignment for over-aligned stack arguments
- tldr
- Prevents misaligned memory accesses when using va_arg with over-aligned stack arguments on i386.
- author
- Uros Bizjak
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • i386
- • alignment
- • va_arg
- • optimization
- • ABI
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-29T00:00:00.000Z
On i386 architectures, this commit corrects how va_arg accesses arguments on the stack when those arguments are over-aligned. Previously, GCC could generate code that read from misaligned addresses, leading to incorrect behavior or crashes, especially with optimizations. The fix ensures that the alignment claimed for accesses does not exceed the actual alignment of the stack slot.