Dear OSdevers,
I implemented SSP as the wiki instructed but failed to get it working. On release build, the stack overflow regress did not trigger the SSP. However, on the debug build, my whole regression test fails due to stack overflows! Why!?
I am learning RISC-V with OSdev. The OS is written in C++ using clang-devel from FreeBSD.
I cannot get Stack Smash Protector working
Re: I cannot get Stack Smash Protector working
Can you post some code? Including the code for the SSP and for the test.
How do your release and debug builds differ?
How do your release and debug builds differ?
And when he came back to, he was flat on his back on the beach in the freezing sand, and it was raining out of a low sky, and the tide was way out.
Re: I cannot get Stack Smash Protector working
I found the bug. It was a function from dlmalloc.
My kernel uses dlmalloc for dynamic memory.
My kernel uses dlmalloc for dynamic memory.
Re: I cannot get Stack Smash Protector working
Are you saying that dlmalloc() has a bug? I find this surprising. Can you explain what was the problem with dlmalloc?