Landing: aa04700525c3
Project / Subsystem
binutils / risc-v
Date
2026-06-05
Author
Jan Beulich <jbeulich@sourceware.org>
Commit
aa04700525c30e140cdab646b72e31faa1608077
Source
public_inbox
Perf win
No
Breaking
No
All attributes
- project
- binutils
- subsystem
- risc-v
- patch_id
- —
- commit_hash
- aa04700525c30e140cdab646b72e31faa1608077
- source_type
- public_inbox
- headline
- Ensure riscv_set_arch() handles failure gracefully
- tldr
- The RISC-V architecture setter `riscv_set_arch()` now prevents null pointer dereferences by setting defaults on failure.
- author
- Jan Beulich <jbeulich@sourceware.org>
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • risc-v
- • bugfix
- • stability
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-06-05T00:00:00.000Z
The riscv_set_arch() function, which configures the RISC-V architecture for the assembler, has been hardened to prevent null pointer dereferences upon failure. Previously, if the function failed to parse an architecture string, subsequent operations might encounter uninitialized riscv_rps_as.subset_list or file_arch_str pointers, leading to crashes. Now, in such error scenarios, the function correctly returns or falls back to a safe default architecture string, ensuring stability and preventing undefined behavior when a valid architecture cannot be determined.