Landing: a015503d4974
Project / Subsystem
binutils / alpha
Date
2026-09-05
Author
Sam James <sjames@sourceware.org>
Commit
a015503d4974eb80e568082274a2beff819d71b7
Source
public_inbox
Perf win
No
Breaking
No
All attributes
- project
- binutils
- subsystem
- alpha
- patch_id
- —
- commit_hash
- a015503d4974eb80e568082274a2beff819d71b7
- source_type
- public_inbox
- headline
- Alpha: Initialize all fields of new GOT entries
- tldr
- Fixes uninitialized memory reads in Alpha GOT entry handling by using bfd_zalloc.
- author
- Sam James <sjames@sourceware.org>
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • linker
- • alpha
- • ELF
- • GOT
- • memory error
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-05T00:00:00.000Z
This commit addresses a bug in the Alpha ELF backend where newly allocated GOT (Global Offset Table) entries were not fully initialized, leading to potential reads of uninitialized memory. The get_got_entry function previously used bfd_alloc, leaving fields like flags uninitialized. This was particularly problematic for GOT entries created for TLS relocations. The fix changes the allocation to bfd_zalloc, which zeroes out the memory, and subsequently only assigns fields that require non-zero initial values, ensuring all fields are properly initialized.