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

Runtime panic in v0.4.3 #162

Closed
DanielHeath opened this issue May 31, 2020 · 1 comment
Closed

Runtime panic in v0.4.3 #162

DanielHeath opened this issue May 31, 2020 · 1 comment

Comments

@DanielHeath
Copy link

Running https://registry.yarnpkg.com/esbuild/-/esbuild-0.4.3.tgz#228e108f849128a2b2e64d524235fef58236912b

The error occurs when compiling multiple entry points at once. Compiling them individually does not cause an error.

$ ./node_modules/.bin/esbuild --outdir=tmp/esbuild --minify --sourcemap <multiple entry points>
panic: runtime error: index out of range [2] with length 1

goroutine 50 [running]:
github.com/evanw/esbuild/internal/bundler.bitSet.hasBit(...)
	/Users/evan/dev/esbuild/internal/bundler/linker.go:27
github.com/evanw/esbuild/internal/bundler.(*linkerContext).includeFile(0xc0004d2000, 0x11, 0x11, 0xc000000000)
	/Users/evan/dev/esbuild/internal/bundler/linker.go:1004 +0x92b
github.com/evanw/esbuild/internal/bundler.(*linkerContext).markPartsReachableFromEntryPoints(0xc0004d2000)
	/Users/evan/dev/esbuild/internal/bundler/linker.go:985 +0x219
github.com/evanw/esbuild/internal/bundler.(*linkerContext).link(0xc0004d2000, 0xc0004ba060, 0x7fd1a0, 0xc0000ac2c0)
	/Users/evan/dev/esbuild/internal/bundler/linker.go:345 +0x61
github.com/evanw/esbuild/internal/bundler.(*Bundle).Compile.func1(0xc0004c4000, 0xc0004ba060, 0xc00008a300, 0xc0004c6000, 0x11, 0x11, 0xc0004940e0, 0x10, 0x11)
	/Users/evan/dev/esbuild/internal/bundler/bundler.go:408 +0x136
created by github.com/evanw/esbuild/internal/bundler.(*Bundle).Compile
	/Users/evan/dev/esbuild/internal/bundler/bundler.go:406 +0x1b4
error Command failed with exit code 2.
@evanw
Copy link
Owner

evanw commented Jun 3, 2020

I can't reproduce this myself. Can you provide a test case that reproduces this behavior?

Edit: never mind, I figured out you need more than eight entry points to reproduce this.

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

2 participants