Skip to content

ext/lexbor: Enable ASAN support in Lexbor#22826

Open
kocsismate wants to merge 5 commits into
php:masterfrom
kocsismate:lexbor-asan
Open

ext/lexbor: Enable ASAN support in Lexbor#22826
kocsismate wants to merge 5 commits into
php:masterfrom
kocsismate:lexbor-asan

Conversation

@kocsismate

Copy link
Copy Markdown
Member

No description provided.

@ndossche ndossche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This doesn't fully work, right?
For example in core/dobject.c in lexbor, it check for LEXBOR_HAVE_ADDRESS_SANITIZER but LEXBOR_HAVE_ADDRESS_SANITIZER is only defined in php_config.h...
I just tried this hypothesis by putting a syntax error under that define and PHP still compiled fine, so that indicates it indeed isn't being picked up there

@kocsismate

Copy link
Copy Markdown
Member Author

Yeah, sorry for the premature PR, I also tested the change (after I opened the PR), and it indeed didn't work that way... But now we'll have a proof that it works: ext/uri/tests/051.phpt will fail. I don't have capacity today to look into the root cause of the issue, so I'll continue tomorrow.

@kocsismate
kocsismate requested a review from petk July 20, 2026 20:11
CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC"
LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function"
CFLAGS="-fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC"
LDFLAGS="-fno-sanitize=function"

@iluuu1994 iluuu1994 Jul 21, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is intentional. See #18535 / #20992.

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.

3 participants