Unity Issue Tracker - Regression for "WebGL build is missing "malloc" and "free" functions when passing "-sERROR_ON_UNDEFINED_SYMBOLS=0" to emscriptenArgs"
Fixed
UUM-126250
Regression for "WebGL build is missing "malloc" and "free" functions when passing "-sERROR_ON_UNDEFINED_SYMBOLS=0" to emscriptenArgs"
Unity 6000.2 has reached its end of life and will not receive further updates. If you need additional fixes, please upgrade to a newer Unity version.
This bug regressed: [Internal link]
The fix is missing in emscripten in Unity 6.1-6.5.
Reproduction steps:
Open the attached “WebGLMissingMethodRepro.zip” project
Open the “SampleScene” scene (Assets > Scenes)
Build and Run for the WebGL (File > Build and Run)
Observe the Player in the browser and turn on Developer Tools (press F12)
Expected result: No errors are thrown
Actual result: “missing function: malloc” and “missing function: free” errors are thrown in the browser’s Console
Reproducible with versions: 6000.0.58f1, 6000.1.0a2, 6000.2.0a1, 6000.3.0a1, 6000.4.0a1, 6000.5.0a1 Not reproducible with versions: 6000.0.11f1, 6000.1.0a1