emscripten-core / emscripten-core/emscripten

Build stalls on massive autogenerated C files

Open
#23,557 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

I've been experimenting with building various things with emscripten to relatively decent success, until recently.

The library in question is [libpostal](https://github.com/openvenues/libpostal). After making a few changes (namely to have it use the clang webassembly SSE intrinsics, increasing the max wasm memory, etc), it hangs on building the enormous scanner.c - this file is autogenerated from re2c, but despite being enormous, non-emscripten builds take on the order of a few dozen seconds. Emscripten's build, however, steadily climbs in memory usage until its killed from OOM. I've thrown 200GB of memory at it and ran it overnight and it still never finished, eventually still dying to an OOM.

I can get the complexity of the file is quite high, but this still seems rather unusual, and I'm having trouble tracking down potential causes - I feel it may be a bug in the toolchain.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.