facebookexperimental / object-introspection

Object Introspection (OI) enables on-demand, hierarchical profiling of objects in arbitrary C/C++ programs with no recompilation.
Apache License 2.0
160 stars 13 forks source link

Correct offset calculation with multiple base classes #494

Closed tyroguru closed 4 months ago

tyroguru commented 4 months ago

Summary

If a class inherits from more than one base class Clang Parser currently calculates incorrect offsets for everything but the first base class. This is owing to the fact that TypeGraph needs offsets in bits but ClangParser is providing them in bytes.

Test plan

make test contains no additional failures. This was tested internally against a Meta source base.