-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Fat pointers with same data part, but different vtables #48795
Copy link
Copy link
Closed
Labels
A-codegenArea: Code generationArea: Code generationA-trait-systemArea: Trait systemArea: Trait systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationA-trait-systemArea: Trait systemArea: Trait systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I did not manage to reproduce in a minimal sample, but in my application, I ended up with:
printing:
After investigations (and discussion on freenode/##rust), it appeared that
xandywere fat pointers having the same data part (the 64 first bits), but a different vtable (the last 64 bits).I applied this patch to my application, which solves the reported issue: Genymobile/gnirehtet@c36fa4d
But I can't understand how two fat pointers for the same objects may have different vtables. Is it expected?