Your message dated Thu, 28 Nov 2013 15:55:01 +0100
with message-id <[email protected]>
and subject line Fixed in the 3.3 release
has caused the Debian Bug report #709212,
regarding clang-3.2: application hangs on fgets with -D_FORTIFY_SOURCE=2 -O1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
709212: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=709212
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: clang-3.2
Version: 1:3.2repack-6
Severity: normal

Dear Maintainer,

The attached (minimal) application hangs when it is compiled with:
    clang++ -D_FORTIFY_SOURCE=2 -O1 -o clang_hang clang_hang.cpp
You need to run it as ./clang_hang clang_hang.cpp

The application works correctly if you remove either the -D or the -O1, or change the -O1 to -O0, -O2 or -O3. Correctly in this case is printing the lines of clang_hang.cpp and exiting within a few milliseconds.

This is (likely) the reason why openttd FTBFS when using clang; the code is the minimized variant of the application that fails during openttd's build.

The application works correctly with GCC on at least versions 4.4, 4.6, 4.7 and 4.8.

Regards,
Remko 'Rubidium' Bijker

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.8-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages clang-3.2 depends on:
ii  libc6                2.17-3
ii  libclang-common-dev  1:3.2repack-6
ii  libffi6              3.0.13-4
ii  libgcc1              1:4.8.0-7
ii  libllvm3.2           1:3.2repack-6
ii  libstdc++6           4.8.0-7
ii  libstdc++6-4.7-dev   4.7.3-4

Versions of packages clang-3.2 recommends:
pn  llvm-3.2-dev  <none>
ii  python        2.7.3-5

clang-3.2 suggests no packages.

-- no debconf information
#include <stdio.h>

struct FileStringReader {
	FILE *fh;
	FileStringReader(const char *file) : fh(fopen(file, "rb")) {}
	char *ReadLine(char *buffer, size_t size) {
		return fgets(buffer, size, this->fh);
	}
};

int main(int argc, char *argv[]) {
	FileStringReader *reader = new FileStringReader(argv[1]);
	char buffer[2048], *line;
	while ((line = reader->ReadLine(buffer, sizeof(buffer))) != NULL) printf("%s", line);
	return 0;
}

--- End Message ---
--- Begin Message ---
fixed 709212 3.3-9
thanks

This bug is fixed in the 3.3 release of clang.

Thanks
Sylvestre

--- End Message ---

Reply via email to