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

filamat: fix ubsan failure #8461

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

filamat: fix ubsan failure #8461

wants to merge 2 commits into from

Conversation

poweifeng
Copy link
Contributor

Enabling UBSan shows the following error:

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior filamat/src/eiff/Flattener.h:102:17 in
filamat/src/eiff/Flattener.h:102:17: runtime error: applying non-zero offset 8 to null pointer

We reference a placeholder byte on the heap when in DryRunner mode to workaround this issue.

@poweifeng poweifeng added the internal Issue/PR does not affect clients label Feb 19, 2025
@poweifeng poweifeng marked this pull request as draft February 20, 2025 00:40
@poweifeng
Copy link
Contributor Author

Unclear why this is failing on github bots.

@poweifeng poweifeng force-pushed the pf/filamat-flattener branch from 1666ccd to 598742d Compare February 20, 2025 18:13
Enabling UBSan shows the following error:

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior filamat/src/eiff/Flattener.h:102:17 in
filamat/src/eiff/Flattener.h:102:17: runtime error: applying non-zero offset 8 to null pointer

We reference a placeholder byte on the heap when in DryRunner mode
to workaround this issue.
@poweifeng poweifeng force-pushed the pf/filamat-flattener branch from 598742d to e2cbbf3 Compare February 20, 2025 18:14
@poweifeng poweifeng marked this pull request as ready for review February 20, 2025 18:16
Copy link
Collaborator

@pixelflinger pixelflinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran into this before and I thought it was dumb and didn't attempt to fix it. Thanks for doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Issue/PR does not affect clients
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants