bun icon indicating copy to clipboard operation
bun copied to clipboard

Segfault when decorating computed property

Open lucasvanhalst opened this issue 9 months ago • 0 comments

How can we reproduce the crash?

Decorate any computed property and it triggers a segfault while transpiling the code.

JavaScript/TypeScript code that reproduces the crash?

import {IsString} from 'class-validator';

export enum ExampleEnum {
    ONE = '1',
    TWO = '2',
}

export class Example {
    @IsString()
    [ExampleEnum.ONE]: string;
}

Relevant log output

No response

Stack Trace (bun.report)

Bun v1.1.6 (e58d67b) on macos aarch64 [AutoCommand]

Segmentation fault at address 0x00000008

  • 2 unknown/js code
  • src.js_printer.NewPrinter
  • src.js_printer.NewPrinter
  • src.bundler.Bundler.printWithSourceMap__anon_301037
  • src.bun.js.module_loader.ModuleLoader.transpileSourceCode__anon_300818
  • Bun__transpileFile
  • Bun::fetchESMSourceCodeAsync
  • Zig::GlobalObject::moduleLoaderFetch
  • JSC::moduleLoaderFetch

lucasvanhalst avatar May 07 '24 07:05 lucasvanhalst