Skip to content

Fix HTTP body editing after deleting the selected node - #851

Merged
chrisgleissner merged 4 commits into
GideonZ:masterfrom
barryw:fix/315-http-body-removal
Sep 14, 2026
Merged

chrisgleissner merged 4 commits into
GideonZ:masterfrom
barryw:fix/315-http-body-removal

Conversation

@barryw

@barryw barryw commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Deleting the selected HTTP body object, or its ancestor, leaves the next edit using freed storage. Keep the editing position at the surviving parent in HttpBodySlot::remove. Tests cover deleting the selection, an ancestor, an unrelated sibling and an array element.

Introduced after 3.14 with the HTTP target. Tested independently against test-merge at 8596576f, in the upstream pipeline’s my_docker_image (host G++ 13.3.0):

make -B -C target/pc/linux/test_http_target test-body-removal

Same tests, changing only the firmware fix:

Before: AddressSanitizer: heap-use-after-free; exit 2
After:  Body removal: 63 checks, 0 failures; exit 0

Red/green evidence; final CI build passed all five firmware targets and the application-space gate. The test target loads ASan before the CI image’s preloaded libraries. Hardware E2E was not run.

Removing the selected body node or an ancestor left the next edit using deleted storage. Move the selection to its surviving parent and cover continued editing with command-level sanitizer tests.
@chrisgleissner

Copy link
Copy Markdown
Collaborator

@barryw Thanks for spotting this.

Could you please analyze which actual user facing features are degraded by this bug so we can triage it for 3.15?

@barryw

barryw commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

@chrisgleissner this can go with 3.16

@chrisgleissner chrisgleissner added bug 3.16 Targets 3.16 release labels Sep 9, 2026
@chrisgleissner
chrisgleissner changed the base branch from test-merge to master September 13, 2026 12:42
@chrisgleissner chrisgleissner added 3.15 and removed 3.16 Targets 3.16 release labels Sep 14, 2026
@chrisgleissner
chrisgleissner merged commit 3d99435 into GideonZ:master Sep 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants