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

[Archlinux Build] libstdc++ std::vector assert with --watch #49544

Closed
Gabriel-Tapes opened this issue Sep 7, 2023 · 5 comments
Closed

[Archlinux Build] libstdc++ std::vector assert with --watch #49544

Gabriel-Tapes opened this issue Sep 7, 2023 · 5 comments
Labels
test_runner Issues and PRs related to the test runner subsystem.

Comments

@Gabriel-Tapes
Copy link

Gabriel-Tapes commented Sep 7, 2023

Version

20.6.0

Platform

Linux archlinux 6.1.51-1-lts #1 SMP PREEMPT_DYNAMIC Sat, 02 Sep 2023 14:51:30 +0000 x86_64 GNU/Linux

Subsystem

node test runner in watch mode

What steps will reproduce the bug?

I'm trying to run a simple test in watch mode, like this:

// index.test.js

import { describe, it } from 'node:test'
import assert from 'node:assert'

describe('test', () => {
  it('should sum two numbers', () => {
    assert.equal(2 + 2, 4)
  })
})

with the command

node --test --watch

like in the documentation.

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior? Why is that the expected behavior?

No response

What do you see instead?

/usr/include/c++/13.2.1/bits/stl_vector.h:1125: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operat
or[](size_type) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<cha
r> >; reference = std::__cxx11::basic_string<char>&; size_type = long unsigned int]: Assertion '__n < this->size()' 
failed.
fish: Task 1, '/bin/node --test --watch' closed by signal SIGABRT (Aborted)

Additional information

if I run node --test instead, everything works perfectely.

@atlowChemi atlowChemi added the test_runner Issues and PRs related to the test runner subsystem. label Sep 8, 2023
@TimonVS
Copy link

TimonVS commented Sep 8, 2023

I'm also having issues with this, but I'm getting a different error (both in Node.js 18 and 20):

λ ~/Code/nodejs-workshop/testing/ node -v            
v20.6.0
λ ~/Code/nodejs-workshop/testing/ find . | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"
.
 |-package.json
 |-src
 | |-math.test.js
 | |-math.js
λ ~/Code/nodejs-workshop/testing/ node --test --watch
node: --watch requires specifying a file

@bnoordhuis
Copy link
Member

@TimonVS not the same issue

@Gabriel-Tapes can you use gdb to get a backtrace? gdb --args node --test --watch and type bt once it crashes

@bnoordhuis bnoordhuis changed the title Bug in test runner watch mode libstdc++ std::vector assert with --watch Sep 9, 2023
@Gabriel-Tapes
Copy link
Author

@bnoordhuis I had the same issue as @TimonVS when using the asdf plugin, but when I installed the package from the Arch Linux repositories, the error I reported started to occur.

> gdb --args node --test --watch
...
Reading symbols from node...
(No debugging symbols found in node)

I got the same return to gdb --args /usr/bin/node --test --watch

@bnoordhuis
Copy link
Member

Report problems with non-official builds (anything not downloaded from nodejs.org) to your vendor, they're probably miscompiles.

@Gabriel-Tapes Gabriel-Tapes changed the title libstdc++ std::vector assert with --watch [Archlinux Build] libstdc++ std::vector assert with --watch Sep 11, 2023
@Gabriel-Tapes
Copy link
Author

Correct, I'm closing this issue in this case, I'm sorry if I inconvenienced anyone unnecessarily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

No branches or pull requests

4 participants