Earlier in Ubuntu 14.04, I used compile a code (using gcc) and no such error used to come. But when I upgrade to 16.04, the same code is giving me this error:
*** stack smashing detected ***: ./main terminated
Aborted (core dumped).
Why is so? When I used -fno-stack-protector
while compiling the error vanished (no segmentation fault either).