Tested on: iPhone11+iOS16.5/iPhoneXS+iOS15.4.
Compile with: XCode12/13/14.
I tried following code, compile with arch=arm64e only, and result in crash "EXC_BAD_ACCESS". at "LDRAA"
std::cout << "";
The crash will not be triggered if:
compile with arch=arm64 only
compile with arch=arm64e only and tested on iOS<=14
not use any c++ I/O api
Post
Replies
Boosts
Views
Activity
Compiler: XCode12/13/14
Tested On: iPhoneXS+iOS15.4 / iPhone11+iOS16.5
I tried to compile following code with arch=arm64e and run, it crashed with EXC_BAD_ACCESS at 'LDRAA', seems occur when trying to access c++ v-table. And this bug will not occur in following conditions. c++ I/O api is easy to trigger the bug.
compile with arch=arm64 and run on arm64e device
compile with arch=arm64e and run on arm64e device with iOS<=14
#include <fstream>
#include <stringstream>
int main(int argc, char** argv) {
std::ifstream MyReadFile("/System/Library/CoreServices/SystemVersion.plist"); // crash1
std::stringstream stream;
stream << std::hex << 0; // crash2
}
I also tried c++11/14/17/20, it makes no difference.