/* --- Begin testcase.c --- */ #include <regex.h> #include <sys/types.h> int main (int argc, char **argv) { int err; regex_t preg; err = regcomp (&preg, "foo", REG_NOSUB); return 0; } /* --- End testcase.c --- */ $ gcc -Wall -o testcase testcase.c -lefence $ ./testcase Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce> ElectricFence Aborting: Allocating 0 bytes, probably a bug. Illegal instruction
malloc (0) is well defined and having to special case this just to avoid efence's complaints is wrong. There is no bug.