kripken/emscripten — Issue #185: Weird bug with func return unsigned receiving string as paramaters
Author: Andrepuel
Created: 2012-01-26 20:49:23+00:00
State: open

So, I had this weird behavior in my project and could isolate the following code:

#include

unsigned func(const std::string&);

extern "C" int func2() {
unsigned number = func("");

return 0;
}

When using the newest emscripten source code, I got the following assertion error:

Assertion failed: More than one unknown label in phi, so both cannot be an unlabelled entry, in __ZNSt3__118__time_get_storageIcEC2EPKc

Taking a look at the emscripten history, I found out that using commit 8069c3cd2ab0968f76421459cd8ccca430f8ddaa this code works fine. When using e36ed341d217b86cdee5c483ce65e9a1208e794c (the next commit on history) the strange behavior shows up.

Ps: I will take a look at the diff between the commits to find out what may be causing this error.
Ps2: I used git checkout -f COMMIT_NUMBER to switch between commits.