"The build timeout" build failure(s) — clang 3.3
The binary produced by clang is wrong when built with -D_FORTIFY_SOURCE=2. For example, the code:
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
int main ()
{
char *data;
int pagesize;
int fd, foo;
pagesize = getpagesize ();
fd = open ("conftest.mmap", O_RDWR);
data = (char *) malloc (pagesize);
foo = read (fd, data, pagesize);
}
compiled with:
clang++ -o conftest -g -O2 -D_FORTIFY_SOURCE=2 conftest.cppwill be stucked in an infinity loop. Reported upstream as bug 16821
No error detected for version 3.3