diff options
Diffstat (limited to 'results/scraper/box64/315')
| -rw-r--r-- | results/scraper/box64/315 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/results/scraper/box64/315 b/results/scraper/box64/315 new file mode 100644 index 000000000..490f6aa6e --- /dev/null +++ b/results/scraper/box64/315 @@ -0,0 +1,16 @@ +C++ iostreams cause a segmentation fault +Inserting into std::cout or std::cerr causes a segmentation fault. The following program segfaults when compiled for x86_64 using either gcc 12.1.0 or clang 13.0.1 and run under box64 on both AArch64 and x86_64: +``` +#include <iostream> + +int main(int argc, char* argv[]) { + std::cout << "broken\n"; + return 0; +} +``` +``` +6407|SIGSEGV @0x64941284 (???(box64+0x64941284)) (x64pc=0x7feadb4a05fe/libstdc++.so.6:"libstdc++.so.6/_ZNSo6sentryC2ERSo + 30", rsp=0x7feadad7c450), for accessing 0xffffffffffffffe8 (code=1) +``` +Comparing the trace with native execution, it appears that at the time of the segfault, RSI contains the address of std::cout, but there are two addresses at std::cout when executed natively and a bunch of zeroes at std::cout under box64, so RAX gets loaded with a null pointer. + +printf does not suffer from this issue. \ No newline at end of file |