Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: 'internal compiler error: bvbulkalloc too big' when compiling a file containing a large map #33437
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
AFAIK this is not new. See #26560 (comment). It can be triggered by huge, auto-generated literals or functions (I've triggered this a few times while fuzzing the compiler with really big autogenerated functions).
The standard workaround is to copy the data in the map in
I used a smaller version of your reproducer with ~5000 map entries. Your code does this:
Compare with this:
Note how the second version initializes the map in
Compiling the first version:
Compiling the second version:
@ALTree thanks. This does work, but increases the size of my binary by about 18MB compared to the prior runtime initialisation method I used e.g. rather than
Looks like I'll take the runtime parsing hit and stick with my existing method. Should this be left open for someone to address the issue of the compiler failure?