Last active
April 30, 2022 23:31
-
-
Save sunho/ba6784608329df6dcc4953aff863f88c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#define ISSUE | |
int main(){ | |
#ifdef ISSUE | |
std::ios_base::sync_with_stdio(true); | |
#else | |
std::ios_base::sync_with_stdio(false); | |
#endif | |
const std::ostream::sentry sentry1(std::cout); | |
if (sentry1) { | |
printf("ok\n"); | |
} | |
return 0; | |
} | |
// The segmentation fault when ISSUE is defined | |
// Commands: | |
// clang++ -c -fPIC hello.cpp -o hello.o | |
// llvm-jitlink hello.o | |
// Enviroment: | |
// Linux 5.13.0-39-generic #44~20.04.1-Ubuntu SMP Thu Mar 24 16:43:35 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment