Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- cat > wtf.cc <<EOF
- struct B { B() {} B(int) {} };
- B crash() { return B(); }
- int main(int argc, char** argv) { }
- EOF
- g++ -O0 -g -c wtf.cc -o wtf.o
- g++ -o wtf wtf.o
- { gdb --args wtf > /dev/null <<EOF
- break main
- run
- p crash()
- EOF
- } 2> /dev/null && echo ok || echo FAIL
- rm wtf.cc wtf.o wtf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement