Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix null pointer arithmetic UB in libregexp #136

Merged
merged 2 commits into from
Nov 29, 2023
Merged

Fix null pointer arithmetic UB in libregexp #136

merged 2 commits into from
Nov 29, 2023

Conversation

linusg
Copy link
Contributor

@linusg linusg commented Nov 25, 2023

Closes #127.

@saghul
Copy link
Contributor

saghul commented Nov 25, 2023

What regex did you use to trigger the bug?

@linusg
Copy link
Contributor Author

linusg commented Nov 28, 2023

I don't remember, sorry. I think it popped up while running test262, crashing the runner with SIGILL.

@saghul
Copy link
Contributor

saghul commented Nov 28, 2023

FWIW we are not seeing crashes when running teat262.

@bnoordhuis thoughts?

@linusg
Copy link
Contributor Author

linusg commented Nov 28, 2023

Yes, this was specific to using libregexp within my own engine (most likely because that uses LLVM via the zig toolchain) :)

When I first investigated this someone suggested running an UBSAN-enabled build, feel free to check that way.

@bnoordhuis bnoordhuis merged commit 3b034b8 into quickjs-ng:master Nov 29, 2023
@linusg linusg deleted the libregexp-ub branch November 29, 2023 13:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UB in libregexp
3 participants