{"url":"https://api.github.com/repos/OpenCyphal/CETL/pulls/208","id":4681286038,"node_id":"PR_kwDOI8qz588AAAABFwbBlg","html_url":"https://github.com/OpenCyphal/CETL/pull/208","diff_url":"https://github.com/OpenCyphal/CETL/pull/208.diff","patch_url":"https://github.com/OpenCyphal/CETL/pull/208.patch","issue_url":"https://api.github.com/repos/OpenCyphal/CETL/issues/208","commits_url":"https://api.github.com/repos/OpenCyphal/CETL/pulls/208/commits","review_comments_url":"https://api.github.com/repos/OpenCyphal/CETL/pulls/208/comments","review_comment_url":"https://api.github.com/repos/OpenCyphal/CETL/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenCyphal/CETL/issues/208/comments","statuses_url":"https://api.github.com/repos/OpenCyphal/CETL/statuses/93a98979225e30c24b1979b74e4012ed466d58aa","number":208,"state":"closed","locked":false,"title":"Fix capacity of VLA moves with unequal allocators","user":{"login":"thirtytwobits","id":19180861,"node_id":"MDQ6VXNlcjE5MTgwODYx","avatar_url":"https://avatars.githubusercontent.com/u/19180861?v=4","gravatar_id":"","url":"https://api.github.com/users/thirtytwobits","html_url":"https://github.com/thirtytwobits","followers_url":"https://api.github.com/users/thirtytwobits/followers","following_url":"https://api.github.com/users/thirtytwobits/following{/other_user}","gists_url":"https://api.github.com/users/thirtytwobits/gists{/gist_id}","starred_url":"https://api.github.com/users/thirtytwobits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thirtytwobits/subscriptions","organizations_url":"https://api.github.com/users/thirtytwobits/orgs","repos_url":"https://api.github.com/users/thirtytwobits/repos","events_url":"https://api.github.com/users/thirtytwobits/events{/privacy}","received_events_url":"https://api.github.com/users/thirtytwobits/received_events","type":"User","user_view_type":"public","site_admin":false},"body":"Moving a VLA with an unequal allocator allocates only the source's occupied storage but records the source's full capacity. Spare capacity is therefore reported as usable memory even though it was never allocated, permitting out-of-bounds appends and incorrect deallocation counts. An empty source with reserved capacity can produce a destination with null storage and nonzero capacity.\n\nRecord the allocated element count as the destination capacity in the unequal-allocator path. Equal-allocator moves continue transferring the original allocation and capacity. The shared fix covers both generic VLA elements and packed bool storage.\n\nAdd six regression tests covering nonempty and empty sources with spare capacity, growth beyond the destination allocation, allocator ownership and deallocation counts, source reuse, and equal-allocator capacity transfer for both `int` and `bool`.\n\nCloses #205.\n\nStacked on #207. This PR targets `codex/fix-vla-allocator-move-noexcept`, so its diff contains only the capacity fix and its tests. Merge #207 first, then retarget this PR to `main`.\n\nValidation:\n\n- Four regression cases fail before the fix; all six pass after it.\n- All eight VLA suites pass in C++14 under GCC 13.4 and Clang 22.1.8, in Debug and exceptions-disabled ReleaseEP configurations, with existing compiler/platform skips retained.\n- The new test suite passes C++17, C++20, and C++23 compilation under GCC and Clang, with exceptions enabled and disabled.\n- The six focused tests pass with Clang AddressSanitizer and UndefinedBehaviorSanitizer.\n- The original reproducer now reports `size=3 capacity=3 allocated=3`, with no deallocation-count mismatch.\n- Formatting and `git diff --check` pass.\n\nThe head commit includes the documented `#verification` trigger so the verification workflow also runs while this PR targets another `codex/` branch.\n","labels":[],"milestone":null,"active_lock_reason":null,"created_at":"2026-09-29T18:56:21Z","updated_at":"2026-10-05T21:13:15Z","closed_at":"2026-10-05T21:13:13Z","merged_at":"2026-10-05T21:13:13Z","merge_commit_sha":"45f61dd863654d2dbcf9dcabe5c3e887e83953b6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"head":{"label":"OpenCyphal:codex/fix-vla-allocator-move-capacity","ref":"codex/fix-vla-allocator-move-capacity","repo":{"id":600486887,"node_id":"R_kgDOI8qz5w","name":"CETL","full_name":"OpenCyphal/CETL","owner":{"login":"OpenCyphal","id":10167381,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTY3Mzgx","avatar_url":"https://avatars.githubusercontent.com/u/10167381?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenCyphal","html_url":"https://github.com/OpenCyphal","followers_url":"https://api.github.com/users/OpenCyphal/followers","following_url":"https://api.github.com/users/OpenCyphal/following{/other_user}","gists_url":"https://api.github.com/users/OpenCyphal/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenCyphal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenCyphal/subscriptions","organizations_url":"https://api.github.com/users/OpenCyphal/orgs","repos_url":"https://api.github.com/users/OpenCyphal/repos","events_url":"https://api.github.com/users/OpenCyphal/events{/privacy}","received_events_url":"https://api.github.com/users/OpenCyphal/received_events","type":"Organization","user_view_type":"public","site_admin":false},"private":false,"fork":false,"archived":false,"disabled":false,"description":"Cyphal Embedded Template Library","homepage":"","language":"C++","visibility":"public","is_template":false,"topics":[],"forks_count":4,"forks":4,"stargazers_count":18,"watchers_count":18,"watchers":18,"open_issues_count":34,"open_issues":34,"size":1439,"default_branch":"main","has_issues":true,"has_projects":false,"has_wiki":false,"has_pages":true,"has_downloads":false,"has_discussions":false,"has_pull_requests":true,"pushed_at":"2026-10-07T16:37:54Z","created_at":"2023-02-11T16:41:07Z","updated_at":"2026-10-06T21:39:53Z","allow_forking":true,"web_commit_signoff_required":false,"pull_request_creation_policy":"all","license":{"key":"mit","name":"MIT License","url":"https://api.github.com/licenses/mit","spdx_id":"MIT","node_id":"MDc6TGljZW5zZTEz"},"url":"https://api.github.com/repos/OpenCyphal/CETL","html_url":"https://github.com/OpenCyphal/CETL","archive_url":"https://api.github.com/repos/OpenCyphal/CETL/{archive_format}{/ref}","assignees_url":"https://api.github.com/repos/OpenCyphal/CETL/assignees{/user}","blobs_url":"https://api.github.com/repos/OpenCyphal/CETL/git/blobs{/sha}","branches_url":"https://api.github.com/repos/OpenCyphal/CETL/branches{/branch}","collaborators_url":"https://api.github.com/repos/OpenCyphal/CETL/collaborators{/collaborator}","comments_url":"https://api.github.com/repos/OpenCyphal/CETL/comments{/number}","commits_url":"https://api.github.com/repos/OpenCyphal/CETL/commits{/sha}","compare_url":"https://api.github.com/repos/OpenCyphal/CETL/compare/{base}...{head}","contents_url":"https://api.github.com/repos/OpenCyphal/CETL/contents/{+path}","contributors_url":"https://api.github.com/repos/OpenCyphal/CETL/contributors","deployments_url":"https://api.github.com/repos/OpenCyphal/CETL/deployments","downloads_url":"https://api.github.com/repos/OpenCyphal/CETL/downloads","events_url":"https://api.github.com/repos/OpenCyphal/CETL/events","forks_url":"https://api.github.com/repos/OpenCyphal/CETL/forks","git_commits_url":"https://api.github.com/repos/OpenCyphal/CETL/git/commits{/sha}","git_refs_url":"https://api.github.com/repos/OpenCyphal/CETL/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/OpenCyphal/CETL/git/tags{/sha}","git_url":"git://github.com/OpenCyphal/CETL.git","issue_comment_url":"https://api.github.com/repos/OpenCyphal/CETL/issues/comments{/number}","issue_events_url":"https://api.github.com/repos/OpenCyphal/CETL/issues/events{/number}","issues_url":"https://api.github.com/repos/OpenCyphal/CETL/issues{/number}","keys_url":"https://api.github.com/repos/OpenCyphal/CETL/keys{/key_id}","labels_url":"https://api.github.com/repos/OpenCyphal/CETL/labels{/name}","languages_url":"https://api.github.com/repos/OpenCyphal/CETL/languages","merges_url":"https://api.github.com/repos/OpenCyphal/CETL/merges","milestones_url":"https://api.github.com/repos/OpenCyphal/CETL/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenCyphal/CETL/notifications{?since,all,participating}","pulls_url":"https://api.github.com/repos/OpenCyphal/CETL/pulls{/number}","releases_url":"https://api.github.com/repos/OpenCyphal/CETL/releases{/id}","ssh_url":"git@github.com:OpenCyphal/CETL.git","stargazers_url":"https://api.github.com/repos/OpenCyphal/CETL/stargazers","statuses_url":"https://api.github.com/repos/OpenCyphal/CETL/statuses/{sha}","subscribers_url":"https://api.github.com/repos/OpenCyphal/CETL/subscribers","subscription_url":"https://api.github.com/repos/OpenCyphal/CETL/subscription","tags_url":"https://api.github.com/repos/OpenCyphal/CETL/tags","teams_url":"https://api.github.com/repos/OpenCyphal/CETL/teams","trees_url":"https://api.github.com/repos/OpenCyphal/CETL/git/trees{/sha}","clone_url":"https://github.com/OpenCyphal/CETL.git","mirror_url":null,"hooks_url":"https://api.github.com/repos/OpenCyphal/CETL/hooks","svn_url":"https://github.com/OpenCyphal/CETL"},"sha":"93a98979225e30c24b1979b74e4012ed466d58aa","user":{"login":"OpenCyphal","id":10167381,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTY3Mzgx","avatar_url":"https://avatars.githubusercontent.com/u/10167381?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenCyphal","html_url":"https://github.com/OpenCyphal","followers_url":"https://api.github.com/users/OpenCyphal/followers","following_url":"https://api.github.com/users/OpenCyphal/following{/other_user}","gists_url":"https://api.github.com/users/OpenCyphal/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenCyphal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenCyphal/subscriptions","organizations_url":"https://api.github.com/users/OpenCyphal/orgs","repos_url":"https://api.github.com/users/OpenCyphal/repos","events_url":"https://api.github.com/users/OpenCyphal/events{/privacy}","received_events_url":"https://api.github.com/users/OpenCyphal/received_events","type":"Organization","user_view_type":"public","site_admin":false}},"base":{"label":"OpenCyphal:codex/fix-vla-allocator-move-noexcept","ref":"codex/fix-vla-allocator-move-noexcept","repo":{"id":600486887,"node_id":"R_kgDOI8qz5w","name":"CETL","full_name":"OpenCyphal/CETL","owner":{"login":"OpenCyphal","id":10167381,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTY3Mzgx","avatar_url":"https://avatars.githubusercontent.com/u/10167381?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenCyphal","html_url":"https://github.com/OpenCyphal","followers_url":"https://api.github.com/users/OpenCyphal/followers","following_url":"https://api.github.com/users/OpenCyphal/following{/other_user}","gists_url":"https://api.github.com/users/OpenCyphal/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenCyphal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenCyphal/subscriptions","organizations_url":"https://api.github.com/users/OpenCyphal/orgs","repos_url":"https://api.github.com/users/OpenCyphal/repos","events_url":"https://api.github.com/users/OpenCyphal/events{/privacy}","received_events_url":"https://api.github.com/users/OpenCyphal/received_events","type":"Organization","user_view_type":"public","site_admin":false},"private":false,"fork":false,"archived":false,"disabled":false,"description":"Cyphal Embedded Template Library","homepage":"","language":"C++","visibility":"public","is_template":false,"topics":[],"forks_count":4,"forks":4,"stargazers_count":18,"watchers_count":18,"watchers":18,"open_issues_count":34,"open_issues":34,"size":1439,"default_branch":"main","has_issues":true,"has_projects":false,"has_wiki":false,"has_pages":true,"has_downloads":false,"has_discussions":false,"has_pull_requests":true,"pushed_at":"2026-10-07T16:37:54Z","created_at":"2023-02-11T16:41:07Z","updated_at":"2026-10-06T21:39:53Z","allow_forking":true,"web_commit_signoff_required":false,"pull_request_creation_policy":"all","license":{"key":"mit","name":"MIT License","url":"https://api.github.com/licenses/mit","spdx_id":"MIT","node_id":"MDc6TGljZW5zZTEz"},"url":"https://api.github.com/repos/OpenCyphal/CETL","html_url":"https://github.com/OpenCyphal/CETL","archive_url":"https://api.github.com/repos/OpenCyphal/CETL/{archive_format}{/ref}","assignees_url":"https://api.github.com/repos/OpenCyphal/CETL/assignees{/user}","blobs_url":"https://api.github.com/repos/OpenCyphal/CETL/git/blobs{/sha}","branches_url":"https://api.github.com/repos/OpenCyphal/CETL/branches{/branch}","collaborators_url":"https://api.github.com/repos/OpenCyphal/CETL/collaborators{/collaborator}","comments_url":"https://api.github.com/repos/OpenCyphal/CETL/comments{/number}","commits_url":"https://api.github.com/repos/OpenCyphal/CETL/commits{/sha}","compare_url":"https://api.github.com/repos/OpenCyphal/CETL/compare/{base}...{head}","contents_url":"https://api.github.com/repos/OpenCyphal/CETL/contents/{+path}","contributors_url":"https://api.github.com/repos/OpenCyphal/CETL/contributors","deployments_url":"https://api.github.com/repos/OpenCyphal/CETL/deployments","downloads_url":"https://api.github.com/repos/OpenCyphal/CETL/downloads","events_url":"https://api.github.com/repos/OpenCyphal/CETL/events","forks_url":"https://api.github.com/repos/OpenCyphal/CETL/forks","git_commits_url":"https://api.github.com/repos/OpenCyphal/CETL/git/commits{/sha}","git_refs_url":"https://api.github.com/repos/OpenCyphal/CETL/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/OpenCyphal/CETL/git/tags{/sha}","git_url":"git://github.com/OpenCyphal/CETL.git","issue_comment_url":"https://api.github.com/repos/OpenCyphal/CETL/issues/comments{/number}","issue_events_url":"https://api.github.com/repos/OpenCyphal/CETL/issues/events{/number}","issues_url":"https://api.github.com/repos/OpenCyphal/CETL/issues{/number}","keys_url":"https://api.github.com/repos/OpenCyphal/CETL/keys{/key_id}","labels_url":"https://api.github.com/repos/OpenCyphal/CETL/labels{/name}","languages_url":"https://api.github.com/repos/OpenCyphal/CETL/languages","merges_url":"https://api.github.com/repos/OpenCyphal/CETL/merges","milestones_url":"https://api.github.com/repos/OpenCyphal/CETL/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenCyphal/CETL/notifications{?since,all,participating}","pulls_url":"https://api.github.com/repos/OpenCyphal/CETL/pulls{/number}","releases_url":"https://api.github.com/repos/OpenCyphal/CETL/releases{/id}","ssh_url":"git@github.com:OpenCyphal/CETL.git","stargazers_url":"https://api.github.com/repos/OpenCyphal/CETL/stargazers","statuses_url":"https://api.github.com/repos/OpenCyphal/CETL/statuses/{sha}","subscribers_url":"https://api.github.com/repos/OpenCyphal/CETL/subscribers","subscription_url":"https://api.github.com/repos/OpenCyphal/CETL/subscription","tags_url":"https://api.github.com/repos/OpenCyphal/CETL/tags","teams_url":"https://api.github.com/repos/OpenCyphal/CETL/teams","trees_url":"https://api.github.com/repos/OpenCyphal/CETL/git/trees{/sha}","clone_url":"https://github.com/OpenCyphal/CETL.git","mirror_url":null,"hooks_url":"https://api.github.com/repos/OpenCyphal/CETL/hooks","svn_url":"https://github.com/OpenCyphal/CETL"},"sha":"25c7deed5c7a0941549ed5822021439642024361","user":{"login":"OpenCyphal","id":10167381,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTY3Mzgx","avatar_url":"https://avatars.githubusercontent.com/u/10167381?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenCyphal","html_url":"https://github.com/OpenCyphal","followers_url":"https://api.github.com/users/OpenCyphal/followers","following_url":"https://api.github.com/users/OpenCyphal/following{/other_user}","gists_url":"https://api.github.com/users/OpenCyphal/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenCyphal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenCyphal/subscriptions","organizations_url":"https://api.github.com/users/OpenCyphal/orgs","repos_url":"https://api.github.com/users/OpenCyphal/repos","events_url":"https://api.github.com/users/OpenCyphal/events{/privacy}","received_events_url":"https://api.github.com/users/OpenCyphal/received_events","type":"Organization","user_view_type":"public","site_admin":false}},"_links":{"comments":{"href":"https://api.github.com/repos/OpenCyphal/CETL/issues/208/comments"},"commits":{"href":"https://api.github.com/repos/OpenCyphal/CETL/pulls/208/commits"},"statuses":{"href":"https://api.github.com/repos/OpenCyphal/CETL/statuses/93a98979225e30c24b1979b74e4012ed466d58aa"},"html":{"href":"https://github.com/OpenCyphal/CETL/pull/208"},"issue":{"href":"https://api.github.com/repos/OpenCyphal/CETL/issues/208"},"review_comments":{"href":"https://api.github.com/repos/OpenCyphal/CETL/pulls/208/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenCyphal/CETL/pulls/comments{/number}"},"self":{"href":"https://api.github.com/repos/OpenCyphal/CETL/pulls/208"}},"author_association":"MEMBER","auto_merge":null,"stack":{"base":{"ref":"main","sha":null},"id":1575761,"number":210,"position":2,"size":2},"draft":false,"merged":true,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":{"login":"thirtytwobits","id":19180861,"node_id":"MDQ6VXNlcjE5MTgwODYx","avatar_url":"https://avatars.githubusercontent.com/u/19180861?v=4","gravatar_id":"","url":"https://api.github.com/users/thirtytwobits","html_url":"https://github.com/thirtytwobits","followers_url":"https://api.github.com/users/thirtytwobits/followers","following_url":"https://api.github.com/users/thirtytwobits/following{/other_user}","gists_url":"https://api.github.com/users/thirtytwobits/gists{/gist_id}","starred_url":"https://api.github.com/users/thirtytwobits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thirtytwobits/subscriptions","organizations_url":"https://api.github.com/users/thirtytwobits/orgs","repos_url":"https://api.github.com/users/thirtytwobits/repos","events_url":"https://api.github.com/users/thirtytwobits/events{/privacy}","received_events_url":"https://api.github.com/users/thirtytwobits/received_events","type":"User","user_view_type":"public","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":5,"additions":470,"deletions":68,"changed_files":5}