Menu

#452 Failure to read ThreadX symbols cause core dump

0.11.0
new
nobody
None
ThreadX
bug
2025-03-25
2025-03-25
Mats
No

Assume openocd is started with parameter -c "CDRTOSConfigure ThreadX".
If it (for some reason) fails to read ThreadX symbols ("Error: No symbols for ThreadX") then a core dump will occur when

rtos->thread_details[tasks_found].threadid = thread_ptr;

is executed in src/rtos/ThreadX.c line 360. The reason is target_read_buffer() on line 284 return a result = ERROR_OK and thread_list_size ==909456160 which causes malloc() on line 335 to return nil. But this isn't tested for so when code reaches line 360 a reference is made to nonexistent memory and segmentation fault is a fact.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB