Skip to content

fix: handle OOM correctly in parser and DOM code#135

Merged
yangzhg merged 1 commit into
bytedance:masterfrom
yangzhg:fix
Apr 23, 2026
Merged

fix: handle OOM correctly in parser and DOM code#135
yangzhg merged 1 commit into
bytedance:masterfrom
yangzhg:fix

Conversation

@yangzhg

@yangzhg yangzhg commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

fix OOM handling in parser, SAX, and DOM paths
avoid null dereferences during mutation and parsing add tests for parser, lazy parse, and DOM OOM cases

@yangzhg yangzhg force-pushed the fix branch 2 times, most recently from 77d0cdb to 814a559 Compare April 22, 2026 09:49
@codecov-commenter

codecov-commenter commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 49.34498% with 116 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.30%. Comparing base (4250a05) to head (5dbf83c).
⚠️ Report is 24 commits behind head on master.

Files with missing lines Patch % Lines
include/sonic/dom/parser.h 36.90% 14 Missing and 39 partials ⚠️
include/sonic/dom/handler.h 60.00% 7 Missing and 11 partials ⚠️
include/sonic/dom/schema_handler.h 29.41% 8 Missing and 4 partials ⚠️
include/sonic/dom/dynamicnode.h 64.51% 3 Missing and 8 partials ⚠️
include/sonic/dom/generic_document.h 56.25% 4 Missing and 3 partials ⚠️
include/sonic/experiment/lazy_update.h 30.00% 1 Missing and 6 partials ⚠️
include/sonic/allocator.h 70.58% 1 Missing and 4 partials ⚠️
include/sonic/writebuffer.h 50.00% 1 Missing and 1 partial ⚠️
include/sonic/internal/stack.h 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #135      +/-   ##
==========================================
- Coverage   74.79%   70.30%   -4.49%     
==========================================
  Files          21       27       +6     
  Lines        2436     3789    +1353     
  Branches      667     1189     +522     
==========================================
+ Hits         1822     2664     +842     
+ Misses        297      212      -85     
- Partials      317      913     +596     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yangzhg yangzhg force-pushed the fix branch 4 times, most recently from 51e7bd3 to d4f9998 Compare April 23, 2026 02:38
fix OOM handling in parser, SAX, and DOM paths
avoid null dereferences during mutation and parsing
add tests for parser, lazy parse, and DOM OOM cases
@liuq19

liuq19 commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5dbf83cb6f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread include/sonic/internal/stack.h

@liuq19 liuq19 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yangzhg yangzhg merged commit 4d83b97 into bytedance:master Apr 23, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants