)]}'
{"id":"openvpn~2035","triplet_id":"openvpn~master~Ib57d973a2f8ef48c3710f7d034da1a91c64d4755","project":"openvpn","branch":"master","full_branch":"refs/heads/master","topic":"fbounds-safety","attention_set":{"1000003":{"account":{"_account_id":1000003,"name":"Arne Schwabe","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"last_update":"2026-10-26 16:40:12.000000000","reason":"Reviewer was added"}},"removed_from_attention_set":{},"hashtags":[],"change_id":"Ib57d973a2f8ef48c3710f7d034da1a91c64d4755","subject":"buffer: add optional -fbounds-safety annotations","status":"NEW","created":"2026-10-26 16:40:11.000000000","updated":"2026-11-20 17:55:33.000000000","submit_type":"CHERRY_PICK","total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"meta_rev_id":"e2cbb466079097c8be834f8485dca3f7acc4f010","_number":2035,"virtual_id_number":2035,"owner":{"_account_id":1000060,"name":"Laptops","display_name":"Jeff Bindel","email":"jeff@incrediblybased.co","username":"LaptopsPlural"},"actions":{},"labels":{"Code-Review":{"all":[{"value":0,"permitted_voting_range":{"min":-2,"max":2},"_account_id":1000003,"name":"Arne Schwabe","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"}],"values":{"-2":"This shall not be submitted","-1":"I would prefer this is not submitted as is"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me, approved"},"description":"","default_value":0}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":1000003,"name":"Arne Schwabe","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"}],"CC":[{"_account_id":1000026,"name":"openvpn-devel","email":"openvpn-devel@lists.sourceforge.net","username":"openvpn-devel"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2026-10-26 16:40:12.000000000","updated_by":{"_account_id":1000060,"name":"Laptops","display_name":"Jeff Bindel","email":"jeff@incrediblybased.co","username":"LaptopsPlural"},"real_updated_by":{"_account_id":1000060,"name":"Laptops","display_name":"Jeff Bindel","email":"jeff@incrediblybased.co","username":"LaptopsPlural"},"reviewer":{"_account_id":1000026,"name":"openvpn-devel","email":"openvpn-devel@lists.sourceforge.net","username":"openvpn-devel"},"state":"CC"},{"updated":"2026-10-26 16:40:12.000000000","updated_by":{"_account_id":1000060,"name":"Laptops","display_name":"Jeff Bindel","email":"jeff@incrediblybased.co","username":"LaptopsPlural"},"real_updated_by":{"_account_id":1000060,"name":"Laptops","display_name":"Jeff Bindel","email":"jeff@incrediblybased.co","username":"LaptopsPlural"},"reviewer":{"_account_id":1000003,"name":"Arne Schwabe","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"state":"REVIEWER"}],"messages":[{"id":"f15a58fdf99aae56a6d1c6fda148e89b651c392c","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000060,"name":"Laptops","display_name":"Jeff Bindel","email":"jeff@incrediblybased.co","username":"LaptopsPlural"},"date":"2026-10-26 16:40:11.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"b1f7e2e9816bcb69b758cfa5a4505b45832a6420","author":{"_account_id":1000060,"name":"Laptops","display_name":"Jeff Bindel","email":"jeff@incrediblybased.co","username":"LaptopsPlural"},"date":"2026-11-09 21:55:01.000000000","message":"Patch Set 1:\n\nHi Frank, Arne, now that the restructuring in 2034 is merged (thanks, Gert), this one and the macOS CI job in 2036 are ready for review. Both still apply cleanly on current master. The annotations are opt-in and compile to nothing without -fbounds-safety, so default builds are unchanged. Happy to rework anything. Thanks!","accounts_in_message":[],"_revision_number":1},{"id":"7e3f448c8720100972ac0cd8da621682e69571ea","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000060,"name":"Laptops","display_name":"Jeff Bindel","email":"jeff@incrediblybased.co","username":"LaptopsPlural"},"date":"2026-11-20 17:55:25.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"e2cbb466079097c8be834f8485dca3f7acc4f010","author":{"_account_id":1000060,"name":"Laptops","display_name":"Jeff Bindel","email":"jeff@incrediblybased.co","username":"LaptopsPlural"},"date":"2026-11-20 17:55:33.000000000","message":"Patch Set 2:\n\nPatch Set 2: rebased over Frank\u0027s size_t changes to buffer.h (buf_set_write\nis now size_t here too), and fixed the --enable-fbounds-safety build on\nLinux: glibc doesn\u0027t annotate memchr(), so buf_extract_field() now forges\nthe result to a pointer to the one matching byte (with a no-op fallback in\ncompat.h). Tested on Debian 13: the default gcc build with --enable-werror\nand an --enable-fbounds-safety build (Clang from the Swift 6.4 toolchain)\nboth pass all 17 unit test drivers. Happy to rebase again if buffer.h\ntypes keep changing.","accounts_in_message":[],"_revision_number":2}],"current_revision_number":2,"current_revision":"8c8f29f8e1a4275f073b2b9810032d53561f8071","revisions":{"45f87821413653b51161c188436baf2526db6acb":{"kind":"REWORK","_number":1,"created":"2026-10-26 16:40:11.000000000","uploader":{"_account_id":1000060,"name":"Laptops","display_name":"Jeff Bindel","email":"jeff@incrediblybased.co","username":"LaptopsPlural"},"ref":"refs/changes/35/2035/1","fetch":{"anonymous http":{"url":"https://gerrit.openvpn.net/openvpn","ref":"refs/changes/35/2035/1","commands":{"Branch":"git fetch https://gerrit.openvpn.net/openvpn refs/changes/35/2035/1 \u0026\u0026 git checkout -b change-2035 FETCH_HEAD","Checkout":"git fetch https://gerrit.openvpn.net/openvpn refs/changes/35/2035/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://gerrit.openvpn.net/openvpn refs/changes/35/2035/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://gerrit.openvpn.net/openvpn refs/changes/35/2035/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://gerrit.openvpn.net/openvpn refs/changes/35/2035/1","Reset To":"git fetch https://gerrit.openvpn.net/openvpn refs/changes/35/2035/1 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"8a522b832d47a21474e5f06da900e418d050f33f","subject":"buffer: restructure some loops and assignments"}],"author":{"name":"Jeff Bindel","email":"jeff@incrediblybased.co","date":"2026-10-26 16:07:22.000000000","tz":-300},"committer":{"name":"Jeff Bindel","email":"jeff@incrediblybased.co","date":"2026-10-26 16:39:17.000000000","tz":-300},"subject":"buffer: add optional -fbounds-safety annotations","message":"buffer: add optional -fbounds-safety annotations\n\nAdd Clang -fbounds-safety annotations to struct buffer and the buffer\nAPI, and allow building buffer.c with -fbounds-safety via\n--enable-fbounds-safety (autotools) or -DENABLE_FBOUNDS_SAFETY\u003dON\n(CMake). The option is off by default.\n\nOnly buffer.c is built with the flag for now, since most other files and\nsome system and library headers are not annotated yet. CMake sets it as\na source file property, so it also applies to the unit tests that build\nbuffer.c. Automake builds buffer.c as a small convenience library with\nits own CFLAGS.\n\ncompat.h uses \u003cptrcheck.h\u003e when it is available, since some system\nheaders include it unconditionally, and only defines no-op fallbacks\nfor annotations that are still undefined.\n\nThe annotations used on non-static declarations (__sized_by,\n__counted_by, __null_terminated, __unsafe_indexable) do not change the\nrepresentation of pointers, so buffer.o is ABI compatible with code\nbuilt without -fbounds-safety. The wide __bidi_indexable pointers are\nonly used as return types of static inline helpers.\n\nThe free function callback of gc_addspecial() takes a\nvoid *__unsafe_indexable, which matches how the macOS SDK declares\nfree(), so free() can be passed without a cast.\n\nChange-Id: Ib57d973a2f8ef48c3710f7d034da1a91c64d4755\nSigned-off-by: Jeff Bindel \u003cjeff@incrediblybased.co\u003e\n"},"branch":"refs/heads/master"},"8c8f29f8e1a4275f073b2b9810032d53561f8071":{"kind":"REWORK","_number":2,"created":"2026-11-20 17:55:25.000000000","uploader":{"_account_id":1000060,"name":"Laptops","display_name":"Jeff Bindel","email":"jeff@incrediblybased.co","username":"LaptopsPlural"},"ref":"refs/changes/35/2035/2","fetch":{"anonymous http":{"url":"https://gerrit.openvpn.net/openvpn","ref":"refs/changes/35/2035/2","commands":{"Branch":"git fetch https://gerrit.openvpn.net/openvpn refs/changes/35/2035/2 \u0026\u0026 git checkout -b change-2035 FETCH_HEAD","Checkout":"git fetch https://gerrit.openvpn.net/openvpn refs/changes/35/2035/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://gerrit.openvpn.net/openvpn refs/changes/35/2035/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://gerrit.openvpn.net/openvpn refs/changes/35/2035/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://gerrit.openvpn.net/openvpn refs/changes/35/2035/2","Reset To":"git fetch https://gerrit.openvpn.net/openvpn refs/changes/35/2035/2 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"297cbcc1633e5259d0455124af574fecc436c53a","subject":"sample-plugins: drop broken defer and log winbuild scripts"}],"author":{"name":"Jeff Bindel","email":"jeff@incrediblybased.co","date":"2026-10-26 16:07:22.000000000","tz":-300},"committer":{"name":"Jeff Bindel","email":"jeff@incrediblybased.co","date":"2026-11-20 17:31:02.000000000","tz":-360},"subject":"buffer: add optional -fbounds-safety annotations","message":"buffer: add optional -fbounds-safety annotations\n\nAdd Clang -fbounds-safety annotations to struct buffer and the buffer\nAPI, and allow building buffer.c with -fbounds-safety via\n--enable-fbounds-safety (autotools) or -DENABLE_FBOUNDS_SAFETY\u003dON\n(CMake). The option is off by default.\n\nOnly buffer.c is built with the flag for now, since most other files and\nsome system and library headers are not annotated yet. CMake sets it as\na source file property, so it also applies to the unit tests that build\nbuffer.c. Automake builds buffer.c as a small convenience library with\nits own CFLAGS.\n\ncompat.h uses \u003cptrcheck.h\u003e when it is available, since some system\nheaders include it unconditionally, and only defines no-op fallbacks\nfor annotations that are still undefined.\n\nThe annotations used on non-static declarations (__sized_by,\n__counted_by, __null_terminated, __unsafe_indexable) do not change the\nrepresentation of pointers, so buffer.o is ABI compatible with code\nbuilt without -fbounds-safety. The wide __bidi_indexable pointers are\nonly used as return types of static inline helpers.\n\nThe free function callback of gc_addspecial() takes a\nvoid *__unsafe_indexable, which matches how the macOS SDK declares\nfree(), so free() can be passed without a cast.\n\nglibc\u0027s string.h is not annotated, so buf_extract_field() turns the\nresult of memchr() into a checked pointer to the one matching byte with\n__unsafe_forge_bidi_indexable(); compat.h gets a no-op fallback for it.\nWith that, --enable-fbounds-safety builds and passes the unit tests on\nLinux/glibc as well as on macOS.\n\nChange-Id: Ib57d973a2f8ef48c3710f7d034da1a91c64d4755\nSigned-off-by: Jeff Bindel \u003cjeff@incrediblybased.co\u003e\n"},"branch":"refs/heads/master"}},"requirements":[{"status":"NOT_READY","fallback_text":"All required checks must pass","type":"checks_pass"}],"submit_records":[{"rule_name":"gerrit~DefaultSubmitRule","status":"NOT_READY","labels":[{"label":"Code-Review","status":"NEED"}]},{"rule_name":"checks~ChecksSubmitRule","status":"NOT_READY","requirements":[{"status":"NOT_READY","fallback_text":"All required checks must pass","type":"checks_pass"}]}]}
