mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
valgrind doesn't understand ioctl arguments, so it does not know if or when they initialize memory, and it complains about conditionals depending on data that comes out of ioctls. That's a problem for bees, where every decision we ever make is based on data an ioctl gave us. Fix the initialization issue by using calloc instead of malloc for ByteVectors when we are building for valgrind. Don't enable this by default because all the callocs aren't necessary (assuming the rest of the code is correct) and hurt performance. Define BEES_VALGRIND in localconf to activate, e.g. echo CCFLAGS += -DBEES_VALGRIND=1 >> localconf Signed-off-by: Zygo Blaxell <bees@furryterror.org>