Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: null array indexing in CTracer_handle_return
CTracer_set_pdata_stack can initialize self.pdata_stack to an empty stack where ->stack is NULL and ->deph is -1. Move index into ->stack into ->depth>=0 check to avoid indexing into NULL array. This issue was found running UndefinedBehaviourSanitizer. It's reproducible in regular test runs, e.g. `python3 -m tox -e py311`. Adding `if (self->pdata_stack->stack == NULL) { fprint(...) }` before the moved line shows the issue in several test cases.
- Loading branch information