Project

General

Profile

Actions

Feature #12227

closed

libctf incorrectly handles clang anonymous unions

Added by Robert Mustacchi almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

clang emits anonymous, inner unions in dwarf in a different way from gcc. This causes two problems:

1. It triggers an existing bug in libctf that causes libctf to enter an infinite loop
2. It emits the nested structure as a sibling of the member. So when processing the structure the first time, we need to actually go through and process the inner type to be consistent with the pass rules in ctf_dwarf.c.


Related issues

Has duplicate illumos gate - Bug #12283: ctfconvert hangs in libctf on C++ binariesClosedRobert Mustacchi

Actions
Actions #1

Updated by Robert Mustacchi over 1 year ago

  • Has duplicate Bug #12283: ctfconvert hangs in libctf on C++ binaries added
Actions #2

Updated by Robert Mustacchi over 1 year ago

I tested this by running updated versions of the CTF test suite against clang. I also regression tested this by running through using the current state of the build and running the ctfwsdiff tool to verify there were no changes in the ctf output.

Actions #3

Updated by Electric Monk over 1 year ago

  • Status changed from New to Closed
  • % Done changed from 90 to 100

git commit 3df9f0641f28754051d5e82c6457527cf4af1258

commit  3df9f0641f28754051d5e82c6457527cf4af1258
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2020-02-13T05:12:47.000Z

    12227 libctf incorrectly handles clang anonymous unions
    Reviewed by: John Levon <john.levon@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF