Hello, I found something very strange bug with std::stringstream on iPhone XS.
I’m still putting in work to reproduce on other iPhone devices but I found it impossible to reproduce on other devices and platforms. the followings are the detailed environment.
UE4 version : 4.21.1
target device : iPhone XS
iOS version : 12.1.1
Xcode version: 10.1
The test scenario is very simple, just put these 4 lines (or maybe 3 lines) into any project and run on iPhone XS.
std::stringstream stream; // just put random long string into the stringstream value. stream << "5sdocmoiatjiladmfc9euhxqincabiughjijdfjafdsjh9rpewiojdsicpklnjijowfvookjkfas"; stream << "5sdocmoiatjiladmfc9euhxq57456456456incabiughjijdfjafdsjh9rpewiojdsicpklnjijowfvookjkfas"; auto temp_string = stream.str(); // <<-- crash point.
The problem occurs in the line that I marked, the application keeps crashing on iPhone XS, right after calling the destructor of std::string that was created temporary while copying the value into the temp_string variable.
I found someone already struggled with the same issue before and fixed in the previous versions(Unreal crashes on two lines of extremely simple standard C++ code (only in Linux) - Platform & Builds - Unreal Engine Forums). I’m guessing this bug is related to new/delete symbols in the linker script but I have no ideas.