Skip to content

HTMLRewriter throwing Error causes Bun to crash #15852

Description

@maccuaa

How can we reproduce the crash?

If I throw an Error from my HTMLRewriter class then Bun crashes with a segmentation fault error

Relevant log output

Stack Trace (bun.report)

Bun v1.1.40 (b5b5100) on macos x86_64 [TestCommand]

Segmentation fault at address 0x00000010

  • 2 unknown/js code
  • lol_html_rewriter_free
  • src.bun.js.api.html_rewriter.HTMLRewriter.BufferOutputSink.deinit
  • src.bun.js.api.html_rewriter.HTMLRewriter.beginTransform
  • HTMLRewriterPrototype__transform
  • WebCore::HTMLRewriterPrototype__transformCallback
  • 1 unknown/js code
  • jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__678_callHelper__dispatch_LowLevelInterpreter64_asm_2538
  • llint_call_javascript

Features: process_dlopen, Bun.stdin, fetch, html_rewriter, jsc, spawn, transpiler_cache, tsconfig, tsconfig

Sentry Issue: BUN-9ZZ

Metadata

Metadata

Assignees

Labels

crashAn issue that could cause a crashmacOSAn issue that occurs on macOS

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions