public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/26120]  New: mudlap behavior changes with trivial changes to build command
@ 2006-02-06 10:18 idht4n at hotmail dot com
  2006-02-06 10:22 ` [Bug c++/26120] " idht4n at hotmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: idht4n at hotmail dot com @ 2006-02-06 10:18 UTC (permalink / raw)
  To: gcc-bugs

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 <stdio.h>
#include <errno.h>

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-06-02 16:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-06 10:18 [Bug c++/26120] New: mudlap behavior changes with trivial changes to build command idht4n at hotmail dot com
2006-02-06 10:22 ` [Bug c++/26120] " idht4n at hotmail dot com
2006-02-06 13:01 ` pinskia at gcc dot gnu dot org
2006-02-06 20:18 ` idht4n at hotmail dot com
2006-02-08 23:00 ` [Bug libmudflap/26120] mudflap " idht4n at hotmail dot com
2006-02-09  1:13 ` pinskia at gcc dot gnu dot org
2006-06-01 23:04 ` idht4n at hotmail dot com
2006-06-02  2:12 ` pinskia at gcc dot gnu dot org
2006-06-02 16:22 ` idht4n at hotmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).