Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang const void* producing: WARNING: broken DIE: DIE DW_TAG_const_type, size=1, has_children=False #444

Open
nickdesaulniers opened this issue Oct 4, 2022 · 4 comments

Comments

@nickdesaulniers
Copy link
Contributor

I think this is coming from pyelftools. Just filing a bug for now in case others come across this, too.

@eliben
Copy link
Owner

eliben commented Oct 4, 2022

👋 Nick.
This is an odd issue report - any reproducer?

@nickdesaulniers
Copy link
Contributor Author

32b x86 linux kernel build.

Indeed via llvm-dwarfdump I see:

0x00005202:     NULL

0x00005203:   DW_TAG_pointer_type
                DW_AT_type      (0x00005208 "const void")

0x00005208:   DW_TAG_const_type

0x00005209:   DW_TAG_pointer_type
                DW_AT_type      (0x0000520e "kioctx_table")

so perhaps a bug in clang producing empty type tags.

@nickdesaulniers
Copy link
Contributor Author

oh, 0x00005203 is a pointer type, it points to a const void. void has an empty DW_TAG_const_type.

const void is pretty funny. "I don't know what this type is, but you'd better not modify it!"

@nickdesaulniers nickdesaulniers changed the title WARNING: broken DIE: DIE DW_TAG_const_type, size=1, has_children=False clang const void* producing: WARNING: broken DIE: DIE DW_TAG_const_type, size=1, has_children=False Oct 5, 2022
@sevaa
Copy link
Contributor

sevaa commented Oct 5, 2022

Saw that too. void* is reported as a pointer to nothing. pyelftools itself parses that happily. Where exactly is the warning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants