Public bug reported: Binary package hint: gcc
I have a small source file which produces a sigsegv in debug code but runs fine optimised to -O3. However, assembler from SuSE compiler or gcc 4.3.3 built on ubuntu 8.10 from gcc.gnu.org source does not crash. $ apt-cache policy gcc gcc: Installed: 4:4.3.1-1ubuntu2 Candidate: 4:4.3.1-1ubuntu2 Version table: *** 4:4.3.1-1ubuntu2 0 500 http://gb.archive.ubuntu.com intrepid/main Packages 100 /var/lib/dpkg/status $ gcc -g soundex.c -o soundex $ ./soundex burroughs ashcroft brc mcknight mcnaught mcknawght strlen("burroughs") B620 burroughs strlen("ashcroft") Segmentation fault Package gcc-3.4 also causes crash: $ gcc-3.4 -g soundex.c -o soundex $ ./soundex burroughs ashcroft brc mcknight mcnaught mcknawght strlen("burroughs") B620 burroughs strlen("ashcroft") Segmentation fault $ apt-cache policy gcc-3.4 gcc-3.4: Installed: 3.4.6-8ubuntu2 Candidate: 3.4.6-8ubuntu2 Version table: *** 3.4.6-8ubuntu2 0 500 http://gb.archive.ubuntu.com intrepid/universe Packages 100 /var/lib/dpkg/status strlen() does not crash if optimised in line (or if I use a home-brew compiler or SuSE compiler): $ gcc -O3 soundex.c -o soundex $ ./soundex burroughs ashcroft brc mcknight mcnaught mcknawght strlen("burroughs") B620 burroughs strlen("ashcroft") A261 ashcroft strlen("brc") B620 brc strlen("mcknight") M252 mcknight strlen("mcnaught") M252 mcnaught strlen("mcknawght") M252 mcknawght ** Affects: gcc-defaults (Ubuntu) Importance: Undecided Status: New -- gcc 4.3.1-lubuntu2 debug code crashes in 8.10 with sigsegv in strlen https://bugs.launchpad.net/bugs/328908 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs