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

Handle function drgn type when enumerating types #422

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tyroguru
Copy link
Contributor

@tyroguru tyroguru commented Dec 7, 2023

Summary

Handle function types when enumerating types.

Test plan

A test needs adding.

@codecov-commenter
Copy link

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (9e2b48d) 68.70% compared to head (86e97e7) 68.68%.
Report is 1 commits behind head on main.

Files Patch % Lines
oi/type_graph/DrgnParser.cpp 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #422      +/-   ##
==========================================
- Coverage   68.70%   68.68%   -0.03%     
==========================================
  Files         119      119              
  Lines       11642    11647       +5     
  Branches     1920     1920              
==========================================
+ Hits         7999     8000       +1     
- Misses       2670     2674       +4     
  Partials      973      973              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tyroguru tyroguru marked this pull request as ready for review December 12, 2023 18:23
@tyroguru tyroguru requested a review from ajor December 12, 2023 18:24
@ajor ajor added the priority label Dec 12, 2023
@JakeHillion
Copy link
Contributor

I'm wondering if this change makes total sense - we're taking in a function type which is explicitly unsized, and stating that it's a sized type StubbedPointer. I wonder if it would make more sense to immediately return an Incomplete from this switch case, along with a depth decrement. That would work if the goal is to prevent hitting the catch statement. I could be missing something though!

I wrote this bit of code which I think neatens up the depth decrement, if we do decrement in this specific switch case it would make sense to use something like this: https://github.com/JakeHillion/object-introspection/blob/6be7e7708bfd69c75faa46d42df81a79734eab46/oi/type_graph/ClangTypeParser.cpp#L45-L55

@ajor ajor removed the priority label Dec 13, 2023
@ajor
Copy link
Contributor

ajor commented Dec 13, 2023

Finding a test case for this proved difficult. Putting this on hold until we hit this issue in production again.

@ajor ajor added the blocked label Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants