)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"7fdcce6daa072a6775ea6c4217c38e8e9d6ed10c","unresolved":true,"context_lines":[{"line_number":30,"context_line":"Mark the format string as non-null in `alloc_vprintf()`."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Checkpatch-ignore: SPACING"},{"line_number":33,"context_line":"(To allow the space after `__attribute__`)."},{"line_number":34,"context_line":"Change-Id: I91011490715998ef5a931c19c3c9d74a1a304e5d"},{"line_number":35,"context_line":"Signed-off-by: Evgeniy Naydanov \u003cevgeniy.naydanov@syntacore.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"2f3d0ccc_2630983f","line":33,"updated":"2025-03-09 23:52:56.000000000","message":"it is accepted by the compiler to have no space after the keyword, e.g.:\n`__attribute__((nonnull (1)));`","commit_id":"2d0f52dbca744fb738678a2f393761a9d9b43608"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"50316777eca9b8a54ac41b7b375a9ef671670a1c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"Mark the format string as non-null in `alloc_vprintf()`."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Checkpatch-ignore: SPACING"},{"line_number":33,"context_line":"(To allow the space after `__attribute__`)."},{"line_number":34,"context_line":"Change-Id: I91011490715998ef5a931c19c3c9d74a1a304e5d"},{"line_number":35,"context_line":"Signed-off-by: Evgeniy Naydanov \u003cevgeniy.naydanov@syntacore.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3b89ec24_c8ed47ba","line":33,"in_reply_to":"263f023d_02221a46","updated":"2025-03-10 09:06:00.000000000","message":"Done","commit_id":"2d0f52dbca744fb738678a2f393761a9d9b43608"},{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"fd76a2542613ec38c5b16235623283484f209631","unresolved":true,"context_lines":[{"line_number":30,"context_line":"Mark the format string as non-null in `alloc_vprintf()`."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Checkpatch-ignore: SPACING"},{"line_number":33,"context_line":"(To allow the space after `__attribute__`)."},{"line_number":34,"context_line":"Change-Id: I91011490715998ef5a931c19c3c9d74a1a304e5d"},{"line_number":35,"context_line":"Signed-off-by: Evgeniy Naydanov \u003cevgeniy.naydanov@syntacore.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"263f023d_02221a46","line":33,"in_reply_to":"2f3d0ccc_2630983f","updated":"2025-03-10 08:46:12.000000000","message":"Addressed","commit_id":"2d0f52dbca744fb738678a2f393761a9d9b43608"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"7fdcce6daa072a6775ea6c4217c38e8e9d6ed10c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"eb27d398_f8154a44","updated":"2025-03-09 23:52:56.000000000","message":"Thanks for the fix","commit_id":"2d0f52dbca744fb738678a2f393761a9d9b43608"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"283cb56647aeb8b9c6ef5129ad1dd71495c02272","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"b0a1738e_e728536c","updated":"2025-03-10 09:05:27.000000000","message":"Thanks.\nBefore I misread the log of checkpatch and I thought the \u0027alarming\u0027 space was after `__attribute__`, instead it\u0027s the one in `nonnull (0)`.\nAnyway, this v2 fixes it too!","commit_id":"a29a087bf82df28f7e486507754d1b5bc4baf784"},{"author":{"_account_id":1002161,"name":"Anatoly P","email":"kupokupokupopo@gmail.com","username":"ecco_the_dolphin"},"change_message_id":"155b55e3af2c32da266db03d88e75dcb2cc51063","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"327aa147_4d9657da","updated":"2025-10-07 18:52:58.000000000","message":"@Antonio, @Evgeniy:\n\nWhile this patch is merged the original issue reported in commit message is still there. To me it looks like some issue with gcc/ubsan. This can be illustrated using godbolt: https://godbolt.org/z/o8dPn9YWv .\n\nThere is also a similar issue on gcc bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id\u003d116834\n\nInternally, when we build OpenOCD with ubsan we\u0027ve just pass the following flag:\n\n```\n\"-Wno-error\u003dformat-truncation\"\n```\n\nto get rid of this compilation failure.\n\nFYI.","commit_id":"e12ceddd5ee4d946107e3764d05ce2810befb293"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"dcc2a375c1c7ce3fe747aa800e27b3ff1a54e17b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"3a20dc91_d548611e","in_reply_to":"327aa147_4d9657da","updated":"2025-10-12 09:53:44.000000000","message":"Replicated, thanks for reporting it.\nI have pushed https://review.openocd.org/c/openocd/+/9166\nPlease let us know if it is working fine for you!","commit_id":"e12ceddd5ee4d946107e3764d05ce2810befb293"}],"src/helper/log.h":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"7fdcce6daa072a6775ea6c4217c38e8e9d6ed10c","unresolved":true,"context_lines":[{"line_number":85,"context_line":"int log_add_callback(log_callback_fn fn, void *priv);"},{"line_number":86,"context_line":"int log_remove_callback(log_callback_fn fn, void *priv);"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"char *alloc_vprintf(const char *fmt, va_list ap) __attribute__ ((nonnull (1)));"},{"line_number":89,"context_line":"char *alloc_printf(const char *fmt, ...)"},{"line_number":90,"context_line":"\t__attribute__ ((format (PRINTF_ATTRIBUTE_FORMAT, 1, 2)));"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":2,"id":"3975de79_2d5cb19a","line":88,"updated":"2025-03-09 23:52:56.000000000","message":"Checking the attribute of `vsnprintf()` from libc is `/usr/include/stdio.h` and then in gcc ref manual\nhttps://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-format-function-attribute\n\n\u003e For functions where the arguments are not available to be checked (such as vprintf), specify the third parameter as zero. In this case the compiler only checks the format string for consistency.\n\nI think a better solution could be by using instead\n`... __attribute__((__format__(__printf__, 1, 0)));`\nas it will still check for nonnull string and will check the string content too","commit_id":"2d0f52dbca744fb738678a2f393761a9d9b43608"},{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"fd76a2542613ec38c5b16235623283484f209631","unresolved":true,"context_lines":[{"line_number":85,"context_line":"int log_add_callback(log_callback_fn fn, void *priv);"},{"line_number":86,"context_line":"int log_remove_callback(log_callback_fn fn, void *priv);"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"char *alloc_vprintf(const char *fmt, va_list ap) __attribute__ ((nonnull (1)));"},{"line_number":89,"context_line":"char *alloc_printf(const char *fmt, ...)"},{"line_number":90,"context_line":"\t__attribute__ ((format (PRINTF_ATTRIBUTE_FORMAT, 1, 2)));"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":2,"id":"8c23fffa_adb2de85","line":88,"in_reply_to":"3975de79_2d5cb19a","updated":"2025-03-10 08:46:12.000000000","message":"Thanks for the suggestion! Addressed.","commit_id":"2d0f52dbca744fb738678a2f393761a9d9b43608"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"50316777eca9b8a54ac41b7b375a9ef671670a1c","unresolved":false,"context_lines":[{"line_number":85,"context_line":"int log_add_callback(log_callback_fn fn, void *priv);"},{"line_number":86,"context_line":"int log_remove_callback(log_callback_fn fn, void *priv);"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"char *alloc_vprintf(const char *fmt, va_list ap) __attribute__ ((nonnull (1)));"},{"line_number":89,"context_line":"char *alloc_printf(const char *fmt, ...)"},{"line_number":90,"context_line":"\t__attribute__ ((format (PRINTF_ATTRIBUTE_FORMAT, 1, 2)));"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":2,"id":"9fc30ac6_4287e9ee","line":88,"in_reply_to":"8c23fffa_adb2de85","updated":"2025-03-10 09:06:00.000000000","message":"Done","commit_id":"2d0f52dbca744fb738678a2f393761a9d9b43608"}]}
