From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21320 invoked by alias); 6 Feb 2006 10:18:44 -0000 Received: (qmail 21304 invoked by uid 48); 6 Feb 2006 10:18:41 -0000 Date: Mon, 06 Feb 2006 10:18:00 -0000 Subject: [Bug c++/26120] New: mudlap behavior changes with trivial changes to build command X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "idht4n at hotmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-02/txt/msg00468.txt.bz2 List-Id: The following two build commands yield executables with different mudflap behavior, which seems like a bug to me: g++ -c -fmudflap -o hello.o hello.cpp ; g++f4 -o hello hello.o -lmudflap g++ -fmudflap -o hello hello.cpp -lmudflap Here's the source for hello.cpp: #include #include int main(int argc, char *argv[]) { errno = 1; printf("%d %s\n", errno, argv[0]); printf("Hello, world!\n"); return 0; } Using gcc from svn from 2006-02-03: {65} g++ -c -fmudflap -o hello.o hello.cpp ; g++f4 -o hello hello.o -lmudflap {66} ./hello ******* mudflap violation 1 (check/write): time=1139021256.756465 ptr=0xb7e926a0 size=4 pc=0xb7ebc322 location=`hello.cpp:6 (main)' /usr/lib/libmudflap.so.0(__mf_check+0x44) [0xb7ebc322] ./hello(main+0x92) [0x8048776] /lib/tls/libc.so.6(__libc_start_main+0xd3) [0xbdae23] number of nearby objects: 0 ******* mudflap violation 2 (check/read): time=1139021256.757309 ptr=0xbf898d64 size=4 pc=0xb7ebc322 location=`hello.cpp:7 (main)' /usr/lib/libmudflap.so.0(__mf_check+0x44) [0xb7ebc322] ./hello(main+0x117) [0x80487fb] /lib/tls/libc.so.6(__libc_start_main+0xd3) [0xbdae23] number of nearby objects: 0 ******* mudflap violation 3 (check/read): time=1139021256.757390 ptr=0xb7e926a0 size=4 pc=0xb7ebc322 location=`hello.cpp:7 (main)' /usr/lib/libmudflap.so.0(__mf_check+0x44) [0xb7ebc322] ./hello(main+0x1a0) [0x8048884] /lib/tls/libc.so.6(__libc_start_main+0xd3) [0xbdae23] number of nearby objects: 0 1 ./hello Hello, world! {67} g++ -fmudflap -o hello hello.cpp -lmudflap {68} ./hello 1 ./hello Hello, world! I built on a P4 running Fedora Core 3 with the svn version of gcc. -- Summary: mudlap behavior changes with trivial changes to build command Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: idht4n at hotmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26120