The Ubuntu GCC turns on -fstack-protector by default. You get the same results when turning this off.
However building and running your program with -fsanitize=address suggests that your program is wrong. ** Changed in: gcc-defaults (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1876958 Title: Ubuntu-specific pthread issue To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1876958/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs