|
Allegro + valgrind / electric fence |
kdevil
Member #1,075
March 2001
|
I'm trying to track down a memory-related bug in my game, but I've found that both valgrind and electric fence don't work with Allegro programs. This is on Ubuntu 8.04 (if that matters), and this happens when using Allegro 4.2.1 or 4.2.2. Trying to run the Allegro demo under valgrind gives me several errors stemming from _unix_load_modules (Errors like "Invalid read of size 4" and "Address 0x4418d38 is 40 bytes inside a block of size 43 alloc'd"), followed by a segfault. When I try to run the Allegro demo using electric fence as my memory debugger, I get a near-instant segfault:
Being unable to use either valgrind or electric fence is a bit crippling. Any idea on how to make Allegro programs work with either of those memory debuggers, or does anyone know of a memory debugger that works with Allegro? ----- |
Trent Gamblin
Member #261
April 2000
|
Compile allegro without asm and valgrind will work.
|
Paul Pridham
Member #250
April 2000
|
I've used Fortify with Allegro, and it works fine: http://www.geocities.com/siliconvalley/horizon/8596/fortify.html ---- |
kdevil
Member #1,075
March 2001
|
Disabling asm did the trick. Valgrind still reports a few errors, but it no longer segfaults, and that's good enough for me. Edit: Thanks, ppridham, I'll also take a look at Fortify. ----- |
|