Bug#521904: llvm-gcc-4.2: miscompiled code on amd64/sid
brian m. carlson
sandals at crustytoothpaste.ath.cx
Mon Mar 30 19:59:52 UTC 2009
Package: llvm-gcc-4.2
Version: 2.5-1
Severity: normal
I have found a case where llvm-gcc-4.2 miscompiles code on amd64/sid.
The testcase is attached. Unfortunately, the testcase requires Qt 4 (I
used 4.5.0 from experimental; I don't know if the version from sid will
work.) I tried to remove the last dependency on QString from Token, but
when I did, the code no longer failed. Thus, to compile it, you'll need
to use:
/usr/lib/llvm/llvm/gcc-4.2/bin/x86_64-linux-gnu-llvm-g++ -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I/usr/include/qt4/QtCore -I/usr/include/qt4 -o troff foo.cxx -lQtCore -lpthread
I apologize in advance for this problem.
The bug occurs in TroffReadxer::parseRequestName. m_compat is set to 4
by the TroffReader constructor. Therefore, m_compat.getMode() returns
4. CompatibilityMode::AllowLongNames is 8. Therefore, maxtoke should
be 2, since (4 & 8) is false. Instead, maxtoke is set to (size_t)-1. A
couple of lines down, the code checks for this case and calls abort(3).
If you need anything else, please let me know.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.29-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages llvm-gcc-4.2 depends on:
ii libc6 2.9-6 GNU C Library: Shared libraries
ii libgcc1 1:4.3.3-5 GCC support library
ii libstdc++6 4.3.3-5 The GNU Standard C++ Library v3
ii llvm 2.5-2 Low-Level Virtual Machine (LLVM) c
ii llvm-dev 2.5-2 common libraries and headers for L
llvm-gcc-4.2 recommends no packages.
Versions of packages llvm-gcc-4.2 suggests:
pn gcc-4.2-doc <none> (no description available)
-- no debconf information
--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
troff on top of XML: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.cxx
Type: text/x-c++src
Size: 5884 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20090330/3e83fc59/attachment.cxx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20090330/3e83fc59/attachment.pgp
More information about the Pkg-llvm-team
mailing list