Skip to content

v1.1.20 segmentation fault crash #12603

@d-kja

Description

@d-kja

How can we reproduce the crash?

Snippet

// just for definition's sake, I'm using pure JS in this case
type Word = {
    value: string,
    maxX: number,
    minX: number,
    maxY: number,
    minY: number,
}

const words: Word[] = [
  {
    value: "Some string",
    maxX: 1.5463,
    minX: 0.4918,
    maxY: 5.3941,
    minY: 5.4753,
  },
  ...
]

export function identifyWithRegex(words, regex) {
  return words.filter((item)=> new RegExp(regex).test(item?.value);
}

const captureYellowFlagCoordinates = identifyWithRegex(
  words,
  /some regex?/i,
)

const captureInjectedValueCoordinates = identifyWithRegex(
  words,
  /another regex? yep\.?/i,
)

Relevant log output

Bun v1.1.18 (5a0b9352) Linux x64
WSL Kernel v5.15.153 | glibc v2.35
Args: "bun" "example.ts"
Features: jsc transpiler_cache(3) tsconfig
Builtins: "bun:main" "node:async_hooks" "node:child_process" "node:events" "node:fs" "node:fs/promises" "node:os" "node:path" "node:string_decoder" "node:tty" "node:util" "node:util/types"
Elapsed: 62ms | User: 30ms | Sys: 30ms
RSS: 1.05GB | Peak: 94.92MB | Commit: 1.05GB | Faults: 2

---

panic(main thread): Segmentation fault at address 0x1A
...some boiler plate to create the issue...
fish: Job 1, 'bun example.ts' terminated by signal SIGILL (Illegal instruction)


### Stack Trace (bun.report)

Bun v1.1.18 ([`5a0b935`](<https://github.com/oven-sh/bun/tree/5a0b93523134ca0043ee7ae84f01003aa4b7ff69>)) on linux x86_64 [TestCommand]

Segmentation fault at address 0x0000001A

- [`ld-temp.o:0`](<https://github.com/oven-sh/bun/blob/5a0b93523134ca0043ee7ae84f01003aa4b7ff69/ld-temp.o#L0>): `WTF::jscSignalHandler`
- `??`
- *1 unknown/js code*
- [`ld-temp.o:0`](<https://github.com/oven-sh/bun/blob/5a0b93523134ca0043ee7ae84f01003aa4b7ff69/ld-temp.o#L0>): `llint_call_javascript`
- [`ld-temp.o:0`](<https://github.com/oven-sh/bun/blob/5a0b93523134ca0043ee7ae84f01003aa4b7ff69/ld-temp.o#L0>): `JSC::Interpreter::executeCall`
- [`ld-temp.o:0`](<https://github.com/oven-sh/bun/blob/5a0b93523134ca0043ee7ae84f01003aa4b7ff69/ld-temp.o#L0>): `JSC::runJSMicrotask`
- [`ld-temp.o:0`](<https://github.com/oven-sh/bun/blob/5a0b93523134ca0043ee7ae84f01003aa4b7ff69/ld-temp.o#L0>): `JSC::VM::drainMicrotasks`
- [`BunProcess.cpp:2558`](<https://github.com/oven-sh/bun/blob/5a0b93523134ca0043ee7ae84f01003aa4b7ff69/src/bun.js/bindings/BunProcess.cpp#L2558>): `Bun::jsFunctionDrainMicrotaskQueue`
- *1 unknown/js code*
- [`ld-temp.o:0`](<https://github.com/oven-sh/bun/blob/5a0b93523134ca0043ee7ae84f01003aa4b7ff69/ld-temp.o#L0>): `llint_op_call_ignore_result`

<!-- from bun.report: TthLldy7ku9Fd1_ukTVW -->

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashAn issue that could cause a crashlinuxAn issue that occurs on Linuxneeds reproNeeds an example to reproduceruntime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions