Commit Graph

4 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult 85453198b6 test: use calloc() instead of malloc()
Using calloc() instead of malloc() as preventive measure, so there
never can be any hidden bugs or leaks due uninitialized memory.

The extra cost of using this compiler intrinsic should be practically
impossible to measure - in many cases a good compiler can even deduce
if certain areas really don't need to be zero'd (because they're written
to right after allocation) and create more efficient machine code.

The code pathes in question are pretty cold anyways, so it's probably
not worth even thinking about potential extra runtime costs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-22 18:58:07 +02:00
Matt Turner d189102c78 test: #undef NDEBUG so assert is not compiled away 2021-12-08 20:59:21 +00:00
Jon Turney feca61cdb5 test: Initialize the pixmap in damage test 2018-09-28 20:02:54 +00:00
Eric Anholt 89901e14d2 test: Add the start of a testsuite for damage.
Inspired by the previous bug, build something we can use to write
damage testcases, including testing for the bug.

Signed-off-by: Eric Anholt <eric@anholt.net>
2018-09-25 21:27:08 -07:00