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

Crash with basic private method example #12940

Closed
kt3k opened this issue Nov 30, 2021 · 8 comments
Closed

Crash with basic private method example #12940

kt3k opened this issue Nov 30, 2021 · 8 comments
Labels
bug Something isn't working upstream Changes in upstream are required to solve these issues

Comments

@kt3k
Copy link
Member

kt3k commented Nov 30, 2021

Found in denoland/deno_std#1655

The following example exits with error status code at the middle of execution.

class A {
  a() {
    this.#b()
  }
  #b() {}
}
for (let i = 0; i < 1e5; i++) {
  console.log(i);
  new A().a();
}
$ deno run test.js
...
10623
10624
10625
10626
10627
10628
10629
zsh: trace trap  deno run test.js

Note: It doesn't have even rust backtrace. It always stops at 10629 on my machine (mac).

Deno v1.15.3 doesn't have this issue. It seems to have started from v1.16.0.

@sno2
Copy link
Contributor

sno2 commented Nov 30, 2021

Can confirm it also shows same behavior and stops at 10629 on Windows and Linux (Ubuntu via WSL):

Edit: There isn't a trace trap error on Windows, though. It silently exits.

@DjDeveloperr
Copy link
Contributor

Stops on 10225 for me. You can use echo %ERRORLEVEL% to know the exit code on Windows, shows -2147483645 but if you convert it to unsigned then to hex it's 0x80000003 (STATUS_BREAKPOINT) 🤔

@sno2
Copy link
Contributor

sno2 commented Nov 30, 2021

Stops on 10225 for me. You can use echo %ERRORLEVEL% to know the exit code on Windows, shows -2147483645 but if you convert it to unsigned then to hex it's 0x80000003 (STATUS_BREAKPOINT) 🤔

Ah, nice. I just used $LastExitCode for powershell and also got exit code -2147483645 on Windows. Different number of iterations still, though.

@piscisaureus
Copy link
Member

Looks like this is probably a V8 bug.

@bartlomieju bartlomieju added bug Something isn't working upstream Changes in upstream are required to solve these issues labels Dec 1, 2021
@kt3k
Copy link
Member Author

kt3k commented Dec 16, 2021

@syg
Copy link

syg commented Dec 20, 2021

Hi, V8 dev here. It is indeed a V8 bug, thank you for reporting. I'm happy deno is exercising the private field code paths and exposing these issues.

@lucacasonato
Copy link
Member

Merged into 9.8 in https://chromium-review.googlesource.com/c/v8/v8/+/3386595. The fix will be present in Deno 1.18.

@bartlomieju
Copy link
Member

Fixed in 1.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Changes in upstream are required to solve these issues
Projects
None yet
Development

No branches or pull requests

7 participants