Skip to content

Conversation

carenas
Copy link
Contributor

@carenas carenas commented Oct 6, 2023

Technically a false positive, but it might be easier to prevent it by going at the source this way.

Fixes: #302

@zherczeg
Copy link
Collaborator

zherczeg commented Oct 8, 2023

What is the effect? It disables something at compile time?

@carenas
Copy link
Contributor Author

carenas commented Oct 8, 2023

Yes; ASAN works by adding "interceptor" routines in the code at build time, so this tells it not to do that for this function.

Copy link
Collaborator

@zherczeg zherczeg left a comment

Choose a reason for hiding this comment

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

LGTM

While it would be ideal to disable only the expected buffer over
reads or let users add the generated functions to an exception list,
this will at least prevent the unexpected crash that ASAN would
trigger otherwise by default.
@zherczeg zherczeg merged commit f5c4eb7 into PCRE2Project:master Nov 12, 2023
@carenas carenas deleted the noasan branch November 12, 2023 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

heap-buffer-overflow in PHP preg_replace on Mac M1 in Linux

2 participants