target/riscv: fix potential UB reported by ubsan in ac cache lookup#1297
Open
aap-sc wants to merge 1 commit intoriscv-collab:riscvfrom
Open
target/riscv: fix potential UB reported by ubsan in ac cache lookup#1297aap-sc wants to merge 1 commit intoriscv-collab:riscvfrom
aap-sc wants to merge 1 commit intoriscv-collab:riscvfrom
Conversation
61b0494 to
c5ad436
Compare
623935d to
2d59879
Compare
when running OpenOCD built with ubsan enabled I've encountered the following error message: ``` riscv-013.c:204:9: runtime error: null pointer passed as argument 2, ... ``` Checkpatch-ignore: GIT_COMMIT_ID This is caused by a NULL pointer passed to bsearch function when abstract command cache is still empty. This behavor was introduced in commit ab97974 ("target/riscv: implement abstract command cache ...") Signed-off-by: Parshintsev Anatoly <anatoly.parshintsev@syntacore.com>
2d59879 to
6e45c13
Compare
aap-sc
added a commit
to syntacore/openocd
that referenced
this pull request
Oct 13, 2025
…cache lookup when running OpenOCD built with ubsan enabled I've encountered the following error message: ``` riscv-013.c:204:9: runtime error: null pointer passed as argument 2, ... ``` Checkpatch-ignore: GIT_COMMIT_ID This is caused by a NULL pointer passed to bsearch function when abstract command cache is still empty. This behavor was introduced in commit ab97974 ("target/riscv: implement abstract command cache ...") See: riscv-collab/riscv-openocd#1297 Signed-off-by: Parshintsev Anatoly <anatoly.parshintsev@syntacore.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
when running OpenOCD built with ubsan enabled I've encountered the following error message:
This is caused by a NULL pointer passed to bsearch function when abstract command cache is still empty. This behavor was introduced in ab97974