Repository navigation
Conversation
3 of 4 tasks
Use the new GetBaseClassOffset(derived, base, address) API for up-casts, which reads virtual base offsets from the object's vtable/vbtable when needed. This eliminates the need for IsBaseReachedVirtually checks and the per-pair JIT-compiled helper for up-casts. Down-casts still use the generated helper as they require dynamic_cast semantics that GetBaseClassOffset does not provide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jmcarcell
force-pushed
the
vbase-offset
branch
from
October 17, 2026 06:43
bd1eb27 to
5794891
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix crashes in Gaudi when an interface has a virtual base and the complete dynamic type is unknown to the interpreter. A static offset for the interface's complete-object layout can point to the wrong subobject.
GetBaseOffsetnow forwards the live derived-subobject address toCpp::GetBaseClassOffsetfor upcasts. Downcasts use static layout offsets because callers obtain the complete type throughGetActualClass. Remove the generated cast helpers and their cache.Strengthen the hidden-type regression with a nonzero offset after the virtual edge, and add coverage for downcasts from virtual bases to a known complete type.
Depends on compiler-research/CppInterOp#1145.
CPPINTEROP_GIT_TAGneeds updating after that PR merges; builds against the current default pin remain blocked by the API dependency.Validated against the updated local CppInterOp source with LLVM 22: 83 tests passed and 2 expected failures across advanced C++, basic API, cross-inheritance, and conversions. Ruff and formatting checks passed.