This is an automated email from Gerrit.

"Antonio Borneo <[email protected]>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9738

-- gerrit

commit dc3d98bd8efaa12564fe30d22206fa82f097e1b2
Author: Antonio Borneo <[email protected]>
Date:   Thu Jun 11 16:51:40 2026 +0200

    target: dsp5680xx: fix segfault on jtag pathmove <state>
    
    After [1] it has been reported that this target causes a segfault.
    This is caused by calling jtag_add_pathmove() with the parameter
    num_states set to zero.
    The function jtag_add_pathmove() is supposed to do nothing in this
    case, but it lacks the check to return.
    
    Simplify the code as there is no need to call jtag_add_pathmove().
    
    Link: commit 0847a4d7fb98 ("jtag/commands: Use 'unsigned int' data type") 
[1]
    Change-Id: I2944778733f9672610d263139219514cc8aed467
    Signed-off-by: Antonio Borneo <[email protected]>
    Reported-by: Evgeniy Naydanov <[email protected]>

diff --git a/src/target/dsp5680xx.c b/src/target/dsp5680xx.c
index 30eca91a57..3dc2e01dc1 100644
--- a/src/target/dsp5680xx.c
+++ b/src/target/dsp5680xx.c
@@ -33,18 +33,9 @@ static int dsp5680xx_execute_queue(void)
  */
 static int reset_jtag(void)
 {
-       enum tap_state states[2];
-
-       const char *cp = "RESET";
-
-       states[0] = tap_state_by_name(cp);
-       int retval = jtag_add_statemove(states[0]);
-       if (retval != ERROR_OK)
-               return retval;
-       retval = jtag_execute_queue();
+       int retval = jtag_add_statemove(TAP_RESET);
        if (retval != ERROR_OK)
                return retval;
-       jtag_add_pathmove(0, states + 1);
        return jtag_execute_queue();
 }
 

-- 

Reply via email to