Re: [PATCH] gas: sframe: Error on open CFI at EOF; missing .cfi_endproc

Project / Subsystem

binutils / gas

Date

2026-04-30

Proposer

Alan Modra <amodra@gmail.com>

Source type

public_inbox

Consensus

Committed

Sentiment

/10

All attributes

project
binutils
subsystem
gas
patch_id
discussion_id
20260413144225.1990952-1-jremus@linux.ibm.com
source_type
public_inbox
title
Re: [PATCH] gas: sframe: Error on open CFI at EOF; missing .cfi_endproc
headline
Gas: sframe: Error on open CFI at EOF; missing .cfi_endproc
tldr
A patch to prevent segfaults in gas when an open CFI is encountered at EOF has been approved.
proposer
Alan Modra <amodra@gmail.com>
consensus
Committed
outcome
proposed
sentiment_score
technical_tradeoffs
[]
series_id
series_role
standalone
series_parts
[]
tags
  • binutils
  • gas
  • assembler
  • sframe
  • cfi
bugzilla_url
date
2026-04-30T00:00:00.000Z

Re: [PATCH] gas: sframe: Error on open CFI at EOF; missing .cfi_endproc

Alan Modra approved a patch from Jens Remus that prevents the assembler (gas) from segfaulting when it encounters an open CFI (Call Frame Information) at the end of a file, meaning a .cfi_startproc directive is present without a corresponding .cfi_endproc. The patch handles this situation similarly to how it’s handled in .eh_frame and .debug_frame generation, by reporting an error and setting the DWARF FDE end address to its start address.