Landing: 618fc86830cb

Project / Subsystem

binutils / binutils/riscv

Date

2026-06-08

Author

Alan Modra <amodra@sourceware.org>

Commit

618fc86830cb51295ff9e177c0c55ebc93e5efc5

Source

public_inbox

Perf win

No

Breaking

No

All attributes

project
binutils
subsystem
binutils/riscv
patch_id
commit_hash
618fc86830cb51295ff9e177c0c55ebc93e5efc5
source_type
public_inbox
headline
RISC-V `ld` avoids segmentation fault when linking crti.o
tldr
Binutils `ld` no longer crashes when linking certain RISC-V object files by adding a null pointer check.
author
Alan Modra <amodra@sourceware.org>
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • risc-v
  • linker
  • bugfix
discussion_id_link
bugzilla_pr
date
2026-06-08T00:00:00.000Z

This commit fixes a segmentation fault in the linker (ld) when processing RISC-V object files, specifically crti.o, which would occur when riscv_parse_add_subset was called with a null isa_spec. The fix reinstates a null pointer check that was previously removed, preventing the linker from dereferencing a null pointer and crashing. This ensures that users compiling for RISC-V do not encounter unexpected linker crashes.