Skip to content

Stack Smashing Detected, despite compiling with -fno-stack-protector #1

Description

@paniq

Despite compiling with -fno-stack-protector added to CFLAGS, make check still fails:

make all
make[1]: Entering directory 'redacted/Checkpointing-Program'
gcc -O0 -fno-stack-protector -o ckpt0 ckpt.c
cp ckpt0 ckpt
rm ckpt0
make[1]: Leaving directory 'redacted/Checkpointing-Program'
rm -f myckpt.dat
./ckpt ./counting-test 17 &
sleep 4
*** We are running, using ckpt ***
Counting from number 17
The next counting number is: 17
The next counting number is: 18
The next counting number is: 19
The next counting number is: 20
kill -12 `pgrep --newest counting-test`
The next counting number is: 21
*** WRITING CHECKPOINT IMAGE FILE ***
pkill -9 counting-test
The next counting number is: 22
./restart
*** RESTARTING ***
*** stack smashing detected ***: terminated
make: *** [Makefile:43: check] Aborted (core dumped)

this is on Linux 5.15.0-97-generic, Ubuntu 22.04.04 LTS

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions