★ wanayoo — archive 1999 https://github.com/nodejs/node/pull/25834Nouvelle recherche | Portail wanayoo
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: handle errors while printing error objects #25834

Closed
wants to merge 1 commit into from

Conversation

Copy link
Member

@addaleax addaleax commented Jan 30, 2019

Handle situations where accessing .name or .stack on an object
fails.

Fixes: #25718

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Handle situations where accessing `.name` or `.stack` on an object
fails.

Fixes: nodejs#25718
@nodejs-github-bot nodejs-github-bot added the c++ label Jan 30, 2019
@addaleax
Copy link
Member Author

@addaleax addaleax commented Feb 1, 2019

@addaleax
Copy link
Member Author

@addaleax addaleax commented Feb 3, 2019

Landed in f722540

@addaleax addaleax closed this Feb 3, 2019
@addaleax addaleax deleted the errors-maybe branch Feb 3, 2019
addaleax added a commit that referenced this issue Feb 3, 2019
Handle situations where accessing `.name` or `.stack` on an object
fails.

Fixes: #25718

PR-URL: #25834
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
addaleax added a commit that referenced this issue Feb 3, 2019
Handle situations where accessing `.name` or `.stack` on an object
fails.

Fixes: #25718

PR-URL: #25834
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@jdalton
Copy link
Member

@jdalton jdalton commented Feb 7, 2019

Nice @addaleax!

I was just going to report this as:

echo "var e = new Error;Reflect.defineProperty(e,'stack', { get() { throw new Error } });throw e" | node

could cause a hard crash. I believe this PR fixed it since I do not hit the issue when I build from master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants