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

Add boundscheck in speccache_eq to avoid OOB access due to data race #54840

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

kpamnany
Copy link
Contributor

Like #54671, but for speccache_eq.

Saw another segfault with this in the stack trace, hence this fix. I also looked for other uses of jl_smallintset_lookup and there's one in idset.c. That doesn't appear to be racy but I'm not familiar with the code, so maybe you can take a look at it in case we need to push a fix for that one too @gbaraldi or @vtjnash?

@vtjnash
Copy link
Sponsor Member

vtjnash commented Jun 18, 2024

The idset_eq probably has the same issue, since it could be used in a race-y way by users, and it is supposed to be safe (if not necessarily defined behavior) in that case

@oscardssmith oscardssmith merged commit dd1ed17 into master Jun 18, 2024
7 checks passed
@oscardssmith oscardssmith deleted the kp/boundscheck_another branch June 18, 2024 01:48
@kpamnany
Copy link
Contributor Author

idset.c isn't in 1.10.2 which is our current version. Also, I didn't see a similar pattern in idset_eq (of using an svec racily) so I'm not quite sure what the race would be there.

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.

None yet

3 participants