On x86-64 when clamav is compiled with gcc-4.3 -O3, it crashes in mew.c. Compiling a reduced testcase shows -ftree-vectorize introduces the bug.
This happens only on gcc-4.3, gcc-4.2 and gcc-4.1 work ok with -O3/-ftree-vectorize. $ gcc-4.3 -O3 test.i -o fails && ./fails Segmentation fault $ gcc-4.3 -O1 -ftree-vectorize test.i -o fails2 && ./fails2 Segmentation fault $ gcc-4.3 -O2 test.i -o works && ./works $ gcc-4.2 -O3 test.i -o works2 && ./works2 $ gcc-4.2 -O3 -ftree-vectorize test.i -o works3 && ./works3 To reproduce on 32-bit x86 use: $ gcc-4.3 -O1 -ftree-vectorize -msse -msse2 test.i -o fails3 && ./fails3 Segmentation fault $ gcc-4.3 -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure linux gnu Thread model: posix gcc version 4.3.1 20080309 (prerelease) (Debian 4.3.0-1) $ uname -a Linux lightspeed2 2.6.25-rc4-00134-g84c6f60 #4 Sun Mar 9 19:40:34 EET 2008 x86_64 GNU/Linux -- Summary: gcc-4.3 -O3/-ftree-vectorize regression: incorrect code generation Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: edwintorok at gmail dot com GCC build triplet: x86_64-linux-gnu GCC host triplet: x86_64-linux-gnu GCC target triplet: x86_64-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35653