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

src: don't crash on invalid script positions #426

Merged
merged 1 commit into from
Oct 18, 2022
Merged

Conversation

kvakil
Copy link
Contributor

@kvakil kvakil commented Oct 1, 2022

This "fixes" the segfault reported in #422, in the sense that you no longer get a segfault. However the printing does not actually work, i.e. you currently get an error like this:

(lldb) v8 i -s 0x2196b1a09a29
error: Invalid source range, start_pos=3108, len=-3098, source_len=10

I'm deeming this better than segfaulting. We should really never be segfaulting as the coredump might be incomplete/partially corrupted. (Also, we already know function printing on v16 doesn't work right now.)

This "fixes" the crash reported in nodejs#422, in the sense that you no longer
get a crash. However the printing does not actually work, i.e. you
currently get an error like this:

```console
(lldb) v8 i -s 0x2196b1a09a29
error: Invalid source range, start_pos=3108, len=-3098, source_len=10
```

I'm deeming this better than crashing. We should really never be
crashing as the coredump might be incomplete/partially corrupted.
(Also, we already know function printing on v16 doesn't work right now.)
@codecov-commenter
Copy link

codecov-commenter commented Oct 1, 2022

Codecov Report

Base: 73.65% // Head: 73.59% // Decreases project coverage by -0.05% ⚠️

Coverage data is based on head (4a950e7) compared to base (eb969e1).
Patch coverage: 40.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #426      +/-   ##
==========================================
- Coverage   73.65%   73.59%   -0.06%     
==========================================
  Files          34       34              
  Lines        4995     4999       +4     
==========================================
  Hits         3679     3679              
- Misses       1316     1320       +4     
Impacted Files Coverage Δ
src/llv8.cc 71.25% <40.00%> (-0.38%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tony-go
Copy link
Member

tony-go commented Oct 2, 2022

Thanks ^^

Definitely better than segfault. 😃

But we don't really know why that is happening. I'm correct?

@No9 No9 merged commit 2769d40 into nodejs:main Oct 18, 2022
@No9
Copy link
Member

No9 commented Oct 18, 2022

LGTM to so merging

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.

None yet

4 participants