-
-
Notifications
You must be signed in to change notification settings - Fork 438
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
null array indexing in coverage/ctracer/tracer.c #1835
Labels
bug
Something isn't working
Comments
I reproduced the issue by applying @Yhg1s' patch top of the current head (28d22a3), except for the $ python3 -m tox -e py311
|
This is now released as part of coverage 7.6.2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue was found by running UndefinedBehaviourSanitizer in our internal builds at Google: coverage/ctracer/tracer.c's
CTracer_handle_return()
is sometimes called in situations whereself->pdata_stack->stack
is NULL after the call toCTracer_set_pdata_stack()
, butCTracer_handle_return()
still tries to index the stack to setself->pcur_entry
. As far as I can tellself->pdata_stack->depth
is always-1
in that case, meaning the NULL array gets indexed with a non-0 index (that would also be out of bounds). I can't tell if this is intentional or not (i.e. whether the resulting value ofself->pcur_entry
actually matters.)Here's a diff to reproduce the error without ubsan:
The text was updated successfully, but these errors were encountered: