Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: inspect: avoid a crash on a DataView with a detached buffer #56669

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ljharb
Copy link
Member

@ljharb ljharb commented Jan 20, 2025

No description provided.

@ljharb ljharb added the util Issues and PRs related to the built-in util module. label Jan 20, 2025
@ljharb ljharb requested a review from BridgeAR January 20, 2025 18:47
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Jan 20, 2025
@ljharb ljharb force-pushed the detached-data-view branch from 76816c0 to 6c20156 Compare January 20, 2025 18:55
@ljharb ljharb force-pushed the detached-data-view branch from 6c20156 to 3b2895d Compare January 20, 2025 20:09
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.21%. Comparing base (da5f7ac) to head (3b2895d).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56669      +/-   ##
==========================================
- Coverage   89.21%   89.21%   -0.01%     
==========================================
  Files         662      662              
  Lines      191893   191914      +21     
  Branches    36936    36941       +5     
==========================================
+ Hits       171189   171207      +18     
- Misses      13541    13549       +8     
+ Partials     7163     7158       -5     
Files with missing lines Coverage Δ
lib/internal/util/inspect.js 99.91% <100.00%> (+<0.01%) ⬆️

... and 41 files with indirect coverage changes

Copy link
Member

@anonrig anonrig left a comment

Choose a reason for hiding this comment

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

LGTM

@ljharb ljharb added request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Jan 20, 2025
Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

The current approach would impact the common case, while it's possible to separate that to only being treated special in case a DataView is handled.
@ljharb please have a look at the detached ArrayBuffer implementation handling. That works without impacting the common case :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants