)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"3d2b502910471b09db36966fa8d8e3fce4b5a661","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"e33d54cf_00d2bb1f","updated":"2024-07-20 09:57:34.000000000","message":"Too big patch to really validate everything and to check for the `%u` in all the format strings, but I would not block the merge for this.\nThere is one real issue below.\nHave you checked if `scan-build` triggers some new issue?","commit_id":"aae53ce6b16547b2aa6c673f5aed5d4a6f393c8c"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"64a45fd8f2e6e7a8c108d290e6e8b18a2e19bcd8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"ccff2758_e4178d94","in_reply_to":"e33d54cf_00d2bb1f","updated":"2024-07-22 09:04:34.000000000","message":"Indeed, the patch is very long and the work is tedious and time consuming. It clearly shows why we need to enforce an appropriate coding style and data types.\n\nYep, I check the patch with `scan-build` and found no new issues.","commit_id":"aae53ce6b16547b2aa6c673f5aed5d4a6f393c8c"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"33d135be68747bb36c56b393ca932fc3d33b83ce","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"d5ccf207_c21efa74","updated":"2024-07-21 19:58:11.000000000","message":"Thanks!\nI hope someone else will also give a check to this long patch.","commit_id":"cca0c4a9145bacdea12c19b8086f95403fdf768d"},{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"df341cda1f51b8cc6155be357dd5be23b18063c1","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":6,"id":"95b76a8b_367ac9af","updated":"2026-05-18 15:20:23.000000000","message":"Antonio, Marc, this patch breaks the call in `reset_jtag()` in `src/target/dsp5680xx.c`:\n```\n        enum tap_state states[2];\n\n        const char *cp \u003d \"RESET\";\n\n        states[0] \u003d tap_state_by_name(cp);\n        retval \u003d jtag_add_statemove(states[0]);\n        err_check_propagate(retval);\n        retval \u003d jtag_execute_queue();\n        err_check_propagate(retval);\n        jtag_add_pathmove(0, states + 1);\n```\nBefore the patch, the call to `jtag_add_pathmove(0, states + 1) was strange but perfectly valid. After the patch, this results in an out-of-bounds access in `jtag_add_pathmove()`:\n```\n        /* the last state has to be a stable state */\n        if (!tap_is_state_stable(path[num_states - 1])) {\n```\nThis used to call `tap_is_state_stable(path[-1])` that is OK since `path` is `states + 1`.\nWith the patch applied this calls `tap_is_state_stable(path[UINT_MAX])` resulting in an undefined behavior.\n\nUnfortunately I don\u0027t have any means to test `dsp5680xx.c` code. Though I believe this issue should be mitigated before 1.0. Please, help me find an appropriate solution.","commit_id":"0847a4d7fb9809a9bb36ba0965f43cb9d43ca2f3"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"9d4e2ac130cce0035e1a5272d40ee52541c0c8c1","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":6,"id":"ca4f2444_0346cab7","in_reply_to":"3dff6ae2_a00b6a12","updated":"2026-06-11 15:12:05.000000000","message":"Would you mind checking\nhttps://review.openocd.org/c/openocd/+/9738\nhttps://review.openocd.org/c/openocd/+/9739\nas I don\u0027t have the target to test them?","commit_id":"0847a4d7fb9809a9bb36ba0965f43cb9d43ca2f3"},{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"1206404c99b4dbad346953ae26c332f4df2cebea","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":6,"id":"3dff6ae2_a00b6a12","in_reply_to":"5b8c770a_38500598","updated":"2026-05-21 11:18:57.000000000","message":"\u003e I wonder what tool helped you find that?\n\nI\u0027ve observed the segfault on `jtag pathmove \u003cstate\u003e` and added an assertion as part of 9664. During review Anatoly Parshintsev looked through the call sites of `jtag_add_pathmove()` and found that the assertion is reached by this call. So, unfortunately no fancy tools here, just the good old `git grep`.","commit_id":"0847a4d7fb9809a9bb36ba0965f43cb9d43ca2f3"},{"author":{"_account_id":1000160,"name":"Paul Fertser","email":"fercerpav@gmail.com","username":"pfertser"},"change_message_id":"64af7c4b4da98b796b27e73da2a7c388488f8bd2","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":6,"id":"5b8c770a_38500598","in_reply_to":"95b76a8b_367ac9af","updated":"2026-05-20 11:56:09.000000000","message":"\u003e Antonio, Marc, this patch breaks the call in `reset_jtag()` in `src/target/dsp5680xx.c`:\n\nI wonder what tool helped you find that?\n\n\u003e ```\n\u003e         enum tap_state states[2];\n\u003e \n\u003e         const char *cp \u003d \"RESET\";\n\u003e \n\u003e         states[0] \u003d tap_state_by_name(cp);\n\u003e         retval \u003d jtag_add_statemove(states[0]);\n\u003e         err_check_propagate(retval);\n\u003e         retval \u003d jtag_execute_queue();\n\u003e         err_check_propagate(retval);\n\u003e         jtag_add_pathmove(0, states + 1);\n\u003e ```\n\nThis is some crazy code :)\n\nProbably Rodrigo can still test if it works with jtag_add_pathmove just dropped altogether?\n BTW, somehow there\u0027re no target config files for `dsp5680xx` at all. Apparently the code only supports halting, flashing and memory read/write but not even reporting core registers or other debugging features. I suggest to not consider this as a blocker.","commit_id":"0847a4d7fb9809a9bb36ba0965f43cb9d43ca2f3"}],"src/jtag/drivers/bitq.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"3d2b502910471b09db36966fa8d8e3fce4b5a661","unresolved":true,"context_lines":[{"line_number":18,"context_line":"/* state of input queue */"},{"line_number":19,"context_line":"struct bitq_state {"},{"line_number":20,"context_line":"\tstruct jtag_command *cmd; /* command currently processed */"},{"line_number":21,"context_line":"\tint field_idx; /* index of field currently being processed */"},{"line_number":22,"context_line":"\tint bit_pos; /* position of bit currently being processed */"},{"line_number":23,"context_line":"\tint status; /* processing status */"},{"line_number":24,"context_line":"};"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"bb19279a_4266d5fb","line":21,"updated":"2024-07-20 09:57:34.000000000","message":"I prefer you change this to `unsigned int` instead of adding a cast in line 38","commit_id":"aae53ce6b16547b2aa6c673f5aed5d4a6f393c8c"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"33d135be68747bb36c56b393ca932fc3d33b83ce","unresolved":false,"context_lines":[{"line_number":18,"context_line":"/* state of input queue */"},{"line_number":19,"context_line":"struct bitq_state {"},{"line_number":20,"context_line":"\tstruct jtag_command *cmd; /* command currently processed */"},{"line_number":21,"context_line":"\tint field_idx; /* index of field currently being processed */"},{"line_number":22,"context_line":"\tint bit_pos; /* position of bit currently being processed */"},{"line_number":23,"context_line":"\tint status; /* processing status */"},{"line_number":24,"context_line":"};"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"27940a5e_205c374f","line":21,"in_reply_to":"bb19279a_4266d5fb","updated":"2024-07-21 19:58:11.000000000","message":"Done","commit_id":"aae53ce6b16547b2aa6c673f5aed5d4a6f393c8c"}],"src/jtag/drivers/openjtag.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"3d2b502910471b09db36966fa8d8e3fce4b5a661","unresolved":true,"context_lines":[{"line_number":768,"context_line":""},{"line_number":769,"context_line":"\t\t\topenjtag_add_byte(command);"},{"line_number":770,"context_line":"\t\t\tnum_cycles -\u003d 16;"},{"line_number":771,"context_line":"\t\t} while (num_cycles \u003e 0);"},{"line_number":772,"context_line":"\t}"},{"line_number":773,"context_line":""},{"line_number":774,"context_line":"\ttap_set_end_state(end_state);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"987a4005_c46e273a","line":771,"updated":"2024-07-20 09:57:34.000000000","message":"I\u0027m not sure this will work!\nAt line 767 it\u0027s assumed that `num_cycles` could be less than 16.\nThen at line 770 it is decremented by 16, so would get negative if it was still `int`.\nThis test here fails with `unsigned int` type.\nThe loop could be fixed computing the decrement, then using it in line 767 and 770.","commit_id":"aae53ce6b16547b2aa6c673f5aed5d4a6f393c8c"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"33d135be68747bb36c56b393ca932fc3d33b83ce","unresolved":false,"context_lines":[{"line_number":768,"context_line":""},{"line_number":769,"context_line":"\t\t\topenjtag_add_byte(command);"},{"line_number":770,"context_line":"\t\t\tnum_cycles -\u003d 16;"},{"line_number":771,"context_line":"\t\t} while (num_cycles \u003e 0);"},{"line_number":772,"context_line":"\t}"},{"line_number":773,"context_line":""},{"line_number":774,"context_line":"\ttap_set_end_state(end_state);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"27fe79ce_369a49ab","line":771,"in_reply_to":"987a4005_c46e273a","updated":"2024-07-21 19:58:11.000000000","message":"Done","commit_id":"aae53ce6b16547b2aa6c673f5aed5d4a6f393c8c"}]}
