Skip to content
Commit 49664141 authored by Tom Tromey's avatar Tom Tromey
Browse files

Correctly handle forward DIE references in scanner

The cooked index scanner has special code to handle forward DIE
references.  However, a bug report lead to the discovery that this
code does not work -- the "deferred_entry::spec_offset" field is
written to but never used, i.e., the lookup is done using the wrong
key.

This patch fixes the bug and adds a regression test.

The test in the bug itself used a thread_local variable, which
provoked a failure at runtime.  This test instead uses "maint print
objfiles" and then inspects to ensure that the entry in question has a
parent.  This lets us avoid a clang dependency in the test.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30271

(cherry picked from commit b10f2cd3)
parent df7e1a3c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment