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

CSS minification: fatal error: stack overflow #3052

Closed
dloebl opened this issue Apr 12, 2023 · 0 comments
Closed

CSS minification: fatal error: stack overflow #3052

dloebl opened this issue Apr 12, 2023 · 0 comments

Comments

@dloebl
Copy link

dloebl commented Apr 12, 2023

Reproducer:

echo "&,a{.b{c" | esbuild --target=safari11 --loader=css

Output:

runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0x140202e03a0 stack=[0x140202e0000, 0x140402e0000]
fatal error: stack overflow

runtime stack:
runtime.throw({0x102b5a50d?, 0x102f17ba0?})
	runtime/panic.go:1047 +0x40 fp=0x16d8ead20 sp=0x16d8eacf0 pc=0x102773b60
runtime.newstack()
	runtime/stack.go:1105 +0x468 fp=0x16d8eaed0 sp=0x16d8ead20 pc=0x10278e128
runtime.morestack()
	runtime/asm_arm64.s:316 +0x70 fp=0x16d8eaed0 sp=0x16d8eaed0 pc=0x1027a5960

goroutine 35 [running]:
github.com/evanw/esbuild/internal/css_lexer.WouldStartIdentifierWithoutEscapes({0x102b5386f, 0x2})
	github.com/evanw/esbuild/internal/css_lexer/css_lexer.go:565 +0x14c fp=0x140202e03a0 sp=0x140202e03a0 pc=0x10297f0cc
github.com/evanw/esbuild/internal/css_printer.(*printer).printIdent(0x140402dfa18, {0x102b5386f, 0x2}, 0x0?, 0x1)
	github.com/evanw/esbuild/internal/css_printer/css_printer.go:661 +0x13c fp=0x140202e0400 sp=0x140202e03a0 pc=0x102aac61c
github.com/evanw/esbuild/internal/css_printer.(*printer).printTokens(0x140402dfa18, {0x1400016e180, 0x4, 0x100?}, {0x0?, 0x0?})
	github.com/evanw/esbuild/internal/css_printer/css_printer.go:779 +0x68c fp=0x140202e0550 sp=0x140202e0400 pc=0x102aad07c
github.com/evanw/esbuild/internal/css_printer.(*printer).printTokens(0x140402dfa18, {0x1400016e180, 0x4, 0x100?}, {0x0?, 0x0?})
	github.com/evanw/esbuild/internal/css_printer/css_printer.go:823 +0xae8 fp=0x140202e06a0 sp=0x140202e0550 pc=0x102aad4d8
github.com/evanw/esbuild/internal/css_printer.(*printer).printTokens(0x140402dfa18, {0x1400016e180, 0x4, 0x100?}, {0x0?, 0x0?})
[..]

Version:

$ esbuild --version
0.17.16
@evanw evanw closed this as completed in a4e19a7 Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant