ext/lexbor: Enable ASAN support in Lexbor#22826
Conversation
ndossche
left a comment
There was a problem hiding this comment.
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
|
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: |
| 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" |
There was a problem hiding this comment.
Oh, thanks for the info.. I didn't understand why not the --enable-*-sanitizer flags were used.
There was a problem hiding this comment.
Desperate times call for desperate measures: https://github.com/php/php-src/pull/22826/changes#diff-8f50e816adac6afb8f364de04db3ca061f2e64f92834d17dc0ceec2a0da9cc21R6
No description provided.