[AD] A handful of bugfixes from Annie |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Hi,
I'm currently trying to valgrindify Allegro.
(see http://developper.kde.org/~sewardj, from the doc: Valgrind is "An
open-source tool for finding memory-management problems in x86 GNU/Linux
executables". It runs the executables on an emulated processor and checks that
memory is accessible when reading from or writing to an address and that data
passed to a syscall was correctly initialized)
After several problems of unhandled opcodes, I re-compiled Allegro with:
--enable-opts=none --disable-asm --disable-mmx --disable-sse.
I also needed to implement checks for several ioctls in Valgrind. (People
interested by the diff can e-mail me).
Many programs are awfully slow with Valgrind (think of one second to redraw the
screen).
Valgrind spotted several problems in Allegro:
. GET_PATTERN_PIXEL (src/c/cdefs*.h) doesn't wrap the x coordinate (see
cdefs.diff)
. A fencepost error in strip (src/unix/umodules.c) (see umodules.diff)
. In al_linux_set_async_mode (src/linux/lasyncio.c), sigaction parameter is not
initialized. I think it's because the parameter should (and isn't) declared
static in the function, but I'm not sure (see lasyncio.diff)
. set_gfx_mode (src/graphics.c) calls set_palette before clear_bitmap(screen),
and XWindow set_palette updates the screen, which means that garbage is blitted
on the screen at the very beginning. I've swapped the calls to set_palette and
clear_bitmap (see graphics.diff)
And (unrelated to Valgrind) there's an incorrect assert in scene3d.c (see
scene3d.diff)
--
Annie
Attachment:
cdefs.diff
Description: Binary data
Attachment:
graphics.diff
Description: Binary data
Attachment:
lasyncio.diff
Description: Binary data
Attachment:
scene3d.diff
Description: Binary data
Attachment:
umodules.diff
Description: Binary data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |