nodejs / llnode

An lldb plugin for Node.js and V8, which enables inspection of JavaScript states for insights into Node.js processes and their core dumps.
Other
1.15k stars 100 forks source link

src: fix JSError inspection with stringified stack #291

Closed mmarchini closed 5 years ago

mmarchini commented 5 years ago

When the stack property of an Error object is accessed in V8, a stringified version of the stack is generated, and then the "raw stack" (with FP and arguments) is removed from memory. Our current inspection code couldn't handle this because it was not checking if the raw stack was a valid object. This commit makes that code more robust and thus fixes inspection of error objects with stringified stacks.

codecov-io commented 5 years ago

Codecov Report

Merging #291 into master will decrease coverage by 1.15%. The diff coverage is 31.57%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #291      +/-   ##
=========================================
- Coverage   79.75%   78.6%   -1.16%     
=========================================
  Files          33      33              
  Lines        4219    4225       +6     
=========================================
- Hits         3365    3321      -44     
- Misses        854     904      +50
Impacted Files Coverage Δ
src/llv8.cc 71.11% <100%> (-3.38%) :arrow_down:
src/printer.cc 77.7% <7.14%> (-1.86%) :arrow_down:
src/llv8.h 80.95% <0%> (-19.05%) :arrow_down:
src/llv8-constants.h 98.48% <0%> (-1.52%) :arrow_down:
src/llv8-constants.cc 82.52% <0%> (-0.98%) :arrow_down:
src/llv8-inl.h 92.58% <0%> (-0.85%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9449d99...d5f6b2d. Read the comment docs.

mmarchini commented 5 years ago

Landed in fb25c91