---

**[tickets:#452] Failure to read ThreadX symbols cause core dump**

**Status:** new
**Milestone:** 0.11.0
**Created:** Tue Mar 25, 2025 03:22 PM UTC by Mats 
**Last Updated:** Tue Mar 25, 2025 03:22 PM UTC
**Owner:** nobody


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.



---

Sent from sourceforge.net because openocd-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/openocd/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/openocd/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.


Reply via email to