)]}'
{"src/flash/nor/core.c":[{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"9efe994095e843b1edfc8b4a1404aa49f34b143d","unresolved":true,"context_lines":[{"line_number":394,"context_line":"\tstruct target_memory_check_block *block_array;"},{"line_number":395,"context_line":"\tblock_array \u003d malloc(bank-\u003enum_sectors * sizeof(struct target_memory_check_block));"},{"line_number":396,"context_line":"\tif (!block_array) {"},{"line_number":397,"context_line":"\t\tLOG_ERROR(\"Out of memory\");"},{"line_number":398,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":399,"context_line":"\t}"},{"line_number":400,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"37f22fdd_e5aa0b00","line":397,"updated":"2026-01-12 13:30:17.000000000","message":"What was wrong on the original code?\nIt used fallback to the slow method which allocates just one 1 KiB block,\nwhich in case of large number of sectors could be smaller than the array required here. If the slow method fails too, it shows the error.","commit_id":"325d95047411cdaf89003bd87fb2d56382312014"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"2a64b92a18a8ef3bb679178eba57ae8aa783d13d","unresolved":true,"context_lines":[{"line_number":394,"context_line":"\tstruct target_memory_check_block *block_array;"},{"line_number":395,"context_line":"\tblock_array \u003d malloc(bank-\u003enum_sectors * sizeof(struct target_memory_check_block));"},{"line_number":396,"context_line":"\tif (!block_array) {"},{"line_number":397,"context_line":"\t\tLOG_ERROR(\"Out of memory\");"},{"line_number":398,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":399,"context_line":"\t}"},{"line_number":400,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"aacf6b48_35f97ec0","line":397,"in_reply_to":"37f22fdd_e5aa0b00","updated":"2026-01-12 14:45:09.000000000","message":"You mean that the size required to `malloc()` above could be bigger that the host memory? In that case I will add a comment to explain it or, better, a `LOG_USER()` as below.","commit_id":"325d95047411cdaf89003bd87fb2d56382312014"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"48bb538758f1ea343b5dfd4d3a2f418a2ce87b95","unresolved":false,"context_lines":[{"line_number":394,"context_line":"\tstruct target_memory_check_block *block_array;"},{"line_number":395,"context_line":"\tblock_array \u003d malloc(bank-\u003enum_sectors * sizeof(struct target_memory_check_block));"},{"line_number":396,"context_line":"\tif (!block_array) {"},{"line_number":397,"context_line":"\t\tLOG_ERROR(\"Out of memory\");"},{"line_number":398,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":399,"context_line":"\t}"},{"line_number":400,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"6a7801e9_66d72818","line":397,"in_reply_to":"53c9c283_b6736a5b","updated":"2026-01-25 10:20:31.000000000","message":"You are right! please check latest Patchset.","commit_id":"325d95047411cdaf89003bd87fb2d56382312014"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"24fb3eac762166f69307a851c3c5ea065b2c066b","unresolved":false,"context_lines":[{"line_number":394,"context_line":"\tstruct target_memory_check_block *block_array;"},{"line_number":395,"context_line":"\tblock_array \u003d malloc(bank-\u003enum_sectors * sizeof(struct target_memory_check_block));"},{"line_number":396,"context_line":"\tif (!block_array) {"},{"line_number":397,"context_line":"\t\tLOG_ERROR(\"Out of memory\");"},{"line_number":398,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":399,"context_line":"\t}"},{"line_number":400,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"aae45123_e5b9ba73","line":397,"in_reply_to":"6a7801e9_66d72818","updated":"2026-01-25 10:31:57.000000000","message":"Thanks!","commit_id":"325d95047411cdaf89003bd87fb2d56382312014"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"aeb2143843def4ffe6ed210573c0ad8115105c48","unresolved":false,"context_lines":[{"line_number":394,"context_line":"\tstruct target_memory_check_block *block_array;"},{"line_number":395,"context_line":"\tblock_array \u003d malloc(bank-\u003enum_sectors * sizeof(struct target_memory_check_block));"},{"line_number":396,"context_line":"\tif (!block_array) {"},{"line_number":397,"context_line":"\t\tLOG_ERROR(\"Out of memory\");"},{"line_number":398,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":399,"context_line":"\t}"},{"line_number":400,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"fa250e56_79880852","line":397,"in_reply_to":"aacf6b48_35f97ec0","updated":"2026-01-12 15:09:16.000000000","message":"Done","commit_id":"325d95047411cdaf89003bd87fb2d56382312014"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"6f20d4aa192b0016c008037a42b0d46fe3fbfa7b","unresolved":false,"context_lines":[{"line_number":394,"context_line":"\tstruct target_memory_check_block *block_array;"},{"line_number":395,"context_line":"\tblock_array \u003d malloc(bank-\u003enum_sectors * sizeof(struct target_memory_check_block));"},{"line_number":396,"context_line":"\tif (!block_array) {"},{"line_number":397,"context_line":"\t\tLOG_ERROR(\"Out of memory\");"},{"line_number":398,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":399,"context_line":"\t}"},{"line_number":400,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"53c9c283_b6736a5b","line":397,"in_reply_to":"fa250e56_79880852","updated":"2026-01-12 15:45:24.000000000","message":"The codebase is not consistent here... but why do you use `LOG_USER()` instead of `LOG_WARNING()`? The latter seems to me to be more consistent with the coding style about logging.","commit_id":"325d95047411cdaf89003bd87fb2d56382312014"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"2be16c467e5fe590d427b508f95c3763802499da","unresolved":true,"context_lines":[{"line_number":425,"context_line":"\t\tretval \u003d ERROR_OK;"},{"line_number":426,"context_line":"\t} else {"},{"line_number":427,"context_line":"\t\tif (retval \u003d\u003d ERROR_NOT_IMPLEMENTED)"},{"line_number":428,"context_line":"\t\t\tLOG_DEBUG(\"Running slow fallback erase check\");"},{"line_number":429,"context_line":"\t\telse"},{"line_number":430,"context_line":"\t\t\tLOG_WARNING(\"Running slow fallback erase check - add working memory\");"},{"line_number":431,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"0998ca6b_1ceeb986","line":428,"updated":"2026-01-25 11:26:37.000000000","message":"Thanks for fixing log level!\n\nI\u0027d prefer LOG_INFO (or WARNING) level here because the slow check\ntakes much much longer than the target algo so user should be warned to not think that OpenOCD crashed.","commit_id":"f34fb78fb57ab3f6ad9109701bc7d9c317e5860b"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"8ca82c68ce0323708053ae03ec9da8a32b28a77f","unresolved":true,"context_lines":[{"line_number":425,"context_line":"\t\tretval \u003d ERROR_OK;"},{"line_number":426,"context_line":"\t} else {"},{"line_number":427,"context_line":"\t\tif (retval \u003d\u003d ERROR_NOT_IMPLEMENTED)"},{"line_number":428,"context_line":"\t\t\tLOG_DEBUG(\"Running slow fallback erase check\");"},{"line_number":429,"context_line":"\t\telse"},{"line_number":430,"context_line":"\t\t\tLOG_WARNING(\"Running slow fallback erase check - add working memory\");"},{"line_number":431,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"0a830c9f_c8bf4d4d","line":428,"in_reply_to":"0998ca6b_1ceeb986","updated":"2026-01-25 12:51:44.000000000","message":"I don\u0027t think we should alert the user at every time a command takes, on one target, longer than on other targets. That\u0027s why I opted for LOG_DEBUG here.\nAnyway, ready to switch to INFO or WARNING. Just let me know what looks more appropriate for you","commit_id":"f34fb78fb57ab3f6ad9109701bc7d9c317e5860b"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"b13ae4e9db30623aa8ce8e4b64115f448093efd5","unresolved":false,"context_lines":[{"line_number":425,"context_line":"\t\tretval \u003d ERROR_OK;"},{"line_number":426,"context_line":"\t} else {"},{"line_number":427,"context_line":"\t\tif (retval \u003d\u003d ERROR_NOT_IMPLEMENTED)"},{"line_number":428,"context_line":"\t\t\tLOG_DEBUG(\"Running slow fallback erase check\");"},{"line_number":429,"context_line":"\t\telse"},{"line_number":430,"context_line":"\t\t\tLOG_WARNING(\"Running slow fallback erase check - add working memory\");"},{"line_number":431,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"8586bd0c_61f2fb2d","line":428,"in_reply_to":"0a830c9f_c8bf4d4d","updated":"2026-03-01 20:18:56.000000000","message":"Let\u0027s merge it as is.\nI mixed `verify_image` with `flash erase_check`. The former runs slowly when target is not halted. `flash erase_check` refuses to run when target is not halted, so there is no point in visible warning. Sorry for that noise.","commit_id":"f34fb78fb57ab3f6ad9109701bc7d9c317e5860b"}]}
