pr34322: assertion failure in get_or_create_member_type

Project / Subsystem

binutils / pr34322

Date

2026-07-04

Proposer

Alan Modra <amodra@gmail.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • Silently ignoring malformed DWARF entries instead of warning or erroring out simplifies parsing but might hide deeper issues in toolchains generating the DWARF data.

All attributes

project
binutils
subsystem
pr34322
patch_id
discussion_id
akjmq8Rm_OBgmsq3@squeak.grove.modra.org
source_type
public_inbox
title
pr34322: assertion failure in get_or_create_member_type
headline
pr34322: assertion failure in get_or_create_member_type
tldr
Fixes a bug in binutils' DWARF processing that caused an assertion failure when encountering DW_TAG_member without a proper struct/union parent.
proposer
Alan Modra <amodra@gmail.com>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • Silently ignoring malformed DWARF entries instead of warning or erroring out simplifies parsing but might hide deeper issues in toolchains generating the DWARF data.
series_id
series_role
standalone
series_parts
[]
tags
  • binutils
  • dwarf
  • debugging
  • bugfix
bugzilla_url
date
2026-07-04T00:00:00.000Z

pr34322: assertion failure in get_or_create_member_type

This patch addresses PR 34322 by modifying binutils’ DWARF parsing logic. Specifically, it changes get_or_create_member_type to return NULL if the parent is NULL, and insert_element_in_list to ignore DW_TAG_member entries that lack a struct or union parent. This prevents an assertion failure and ensures malformed DWARF information is handled more gracefully.