And then the environment variable EF_ALLOW_MALLOC_0 set to 1 before running to allow malloc(0) to work, when run, the program crashes on exit.
Does anybody have any ideas why this is? This is a minimal reproducible case from a much larger program I’m working on which sometimes crashes on exit.
Did you run it in a debugger? I think that’s the appropriate way to use
Electric Fence. If there’s a memory error, then it is supposed to crash
(with a segfault).
Jonny DOn Mon, Nov 23, 2009 at 2:43 PM, Sirp wrote:
When using electric fence on Linux, using SDL with OpenGL causes a crash.
Here’s the code of a reproducible test I wrote:
Code:
#include #include
int main() {
if(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_JOYSTICK) < 0) {
return -1;
}
And then the environment variable EF_ALLOW_MALLOC_0 set to 1 before running
to allow malloc(0) to work, when run, the program crashes on exit.
Does anybody have any ideas why this is? This is a minimal reproducible
case from a much larger program I’m working on which sometimes crashes on
exit.
Also, what version of SDL were you using? If you were using SDL 1.2, does
it also happen with SDL 1.3?
Thanks!On Tue, Nov 24, 2009 at 8:13 AM, Jonathan Dearborn wrote:
Did you run it in a debugger? I think that’s the appropriate way to use
Electric Fence. If there’s a memory error, then it is supposed to crash
(with a segfault).
Jonny D
On Mon, Nov 23, 2009 at 2:43 PM, Sirp wrote:
When using electric fence on Linux, using SDL with OpenGL causes a
crash. Here’s the code of a reproducible test I wrote:
Code:
#include #include
int main() {
if(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_JOYSTICK) < 0) {
return -1;
}
And then the environment variable EF_ALLOW_MALLOC_0 set to 1 before
running to allow malloc(0) to work, when run, the program crashes on exit.
Does anybody have any ideas why this is? This is a minimal reproducible
case from a much larger program I’m working on which sometimes crashes on
exit.