Skip to content

Conversation

aap-sc
Copy link
Collaborator

@aap-sc aap-sc commented Oct 8, 2025

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, which is declared to never be null

This is caused by a NULL pointer passed to bsearch function when abstract command cache is still empty. This behavor was introduced in ab97974

@aap-sc aap-sc requested review from JanMatCodasip, MarekVCodasip and en-sc and removed request for MarekVCodasip October 8, 2025 18:21
@aap-sc aap-sc force-pushed the aap-sc/ubsan_fixes branch from 61b0494 to c5ad436 Compare October 8, 2025 18:24
@aap-sc aap-sc force-pushed the aap-sc/ubsan_fixes branch 2 times, most recently from 623935d to 2d59879 Compare October 8, 2025 19:09
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 <[email protected]>
@aap-sc aap-sc force-pushed the aap-sc/ubsan_fixes branch from 2d59879 to 6e45c13 Compare October 8, 2025 19:20
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 <[email protected]>
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.

1 participant