)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"14ff7b11753426d49a33163d239f58ae41f10db5","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"5fa57323_eef8e7bd","updated":"2025-11-19 12:13:59.000000000","message":"Tomas, I believe the root cause of the issue is an error in d7142a57271079eca8e1c15034b74499ff4e3ef5 -- AFAIU, in case `target-\u003etype-\u003echecksum_memory` is `NULL`, `target_checksum_memory()` should not error-out, but continue to the slow path, similar to the case when `target-\u003etype-\u003echecksum_memory()` returns an error.\nPlease, take a look at my suggestion.","commit_id":"b8637104b8e88dfae33edfd64a714ffdabddc888"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"d0e1a39a8638be44c3b1f998d6a1b176dcf0bc10","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"bccf00a3_2f5ea36f","in_reply_to":"5fa57323_eef8e7bd","updated":"2025-11-19 12:39:56.000000000","message":"Yes, you\u0027re right.","commit_id":"b8637104b8e88dfae33edfd64a714ffdabddc888"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"c6d79269e874d2d9ae9f375137dfd974b8a33555","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"42892acd_dfd44276","in_reply_to":"bccf00a3_2f5ea36f","updated":"2025-11-19 13:34:50.000000000","message":"Evgeniy, thanks for pointing that. I had a feeling that there was a slow workaround for checksum memory but didn\u0027t see the code couple of lines below.","commit_id":"b8637104b8e88dfae33edfd64a714ffdabddc888"}],"src/target/target.c":[{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"14ff7b11753426d49a33163d239f58ae41f10db5","unresolved":true,"context_lines":[{"line_number":2490,"context_line":""},{"line_number":2491,"context_line":"\tretval \u003d target-\u003etype-\u003echecksum_memory(target, address, size, \u0026checksum);"},{"line_number":2492,"context_line":"\tif (retval !\u003d ERROR_OK) {"},{"line_number":2493,"context_line":"\t\tbuffer \u003d malloc(size);"},{"line_number":2494,"context_line":"\t\tif (!buffer) {"},{"line_number":2495,"context_line":"\t\t\tLOG_ERROR(\"error allocating buffer for section (%\" PRIu32 \" bytes)\", size);"},{"line_number":2496,"context_line":"\t\t\treturn ERROR_COMMAND_SYNTAX_ERROR;"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"6e33acc5_2bb48a9f","line":2493,"updated":"2025-11-19 12:13:59.000000000","message":"There is already a slow path for the case when `target-\u003etype-\u003echecksum_memory()` returns an error. IMHO there should be no difference between `target-\u003etype-\u003echecksum_memory` being `NULL` and being a function that unconditionally returns `ERROR_NOT_IMPLEMENTED`, so I feel like this slow path should be reused for the case `target-\u003etype-\u003echecksum_memory` is `NULL`.\nPerhaps something like:\n```\nretval \u003d ERROR_NOT_IMPLEMENTED;\nif (target-\u003etype-\u003echecksum_memory)\n    retval \u003d target-\u003etype-\u003echecksum_memory(target, address, size, \u0026checksum);\n\nif (retval !\u003d ERROR_OK) {\n    ....\n```","commit_id":"b8637104b8e88dfae33edfd64a714ffdabddc888"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"c6d79269e874d2d9ae9f375137dfd974b8a33555","unresolved":false,"context_lines":[{"line_number":2490,"context_line":""},{"line_number":2491,"context_line":"\tretval \u003d target-\u003etype-\u003echecksum_memory(target, address, size, \u0026checksum);"},{"line_number":2492,"context_line":"\tif (retval !\u003d ERROR_OK) {"},{"line_number":2493,"context_line":"\t\tbuffer \u003d malloc(size);"},{"line_number":2494,"context_line":"\t\tif (!buffer) {"},{"line_number":2495,"context_line":"\t\t\tLOG_ERROR(\"error allocating buffer for section (%\" PRIu32 \" bytes)\", size);"},{"line_number":2496,"context_line":"\t\t\treturn ERROR_COMMAND_SYNTAX_ERROR;"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"662714c3_e45164c8","line":2493,"in_reply_to":"6e33acc5_2bb48a9f","updated":"2025-11-19 13:34:50.000000000","message":"Ack","commit_id":"b8637104b8e88dfae33edfd64a714ffdabddc888"}]}
