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

* [Bug c++/26120] mudlap behavior changes with trivial changes to build command
  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 ` idht4n at hotmail dot com
  2006-02-06 13:01 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: idht4n at hotmail dot com @ 2006-02-06 10:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from idht4n at hotmail dot com  2006-02-06 10:22 -------
In my original report, g++f4 is the same as g++ and are both svn 2006-02-03
versions.  Sorry for any confusion.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26120


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

* [Bug c++/26120] mudlap behavior changes with trivial changes to build command
  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
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-06 13:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-02-06 13:01 -------
It worked in "4.1.0 20051026".


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26120


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

* [Bug c++/26120] mudlap behavior changes with trivial changes to build command
  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
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: idht4n at hotmail dot com @ 2006-02-06 20:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from idht4n at hotmail dot com  2006-02-06 20:18 -------
(In reply to comment #2)
> It worked in "4.1.0 20051026".
> 
Is 4.1.0 20051026 a snapshot?  It doesn't appear on the ftp mirror I checked...
the snapshots went from 20051022 to 20051029.  How do I get the version of
which you speak?

Directory: 4.1-20051022                 10/22/2005      11:08:00 PM
Directory: 4.1-20051029                 10/29/2005      11:09:00 PM


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26120


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

* [Bug libmudflap/26120] mudflap behavior changes with trivial changes to build command
  2006-02-06 10:18 [Bug c++/26120] New: mudlap behavior changes with trivial changes to build command idht4n at hotmail dot com
                   ` (2 preceding siblings ...)
  2006-02-06 20:18 ` idht4n at hotmail dot com
@ 2006-02-08 23:00 ` idht4n at hotmail dot com
  2006-02-09  1:13 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: idht4n at hotmail dot com @ 2006-02-08 23:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from idht4n at hotmail dot com  2006-02-08 23:00 -------
(In reply to comment #2)
> It worked in "4.1.0 20051026".
> 

I just downloaded snapshot 4.1-20051029 which reports the version that you
mentioned and it exhibits the same behavior:

 ~/gcc4.1-20051029/bin/g++ --version
g++ (GCC) 4.1.0 20051026 (experimental)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~/gcc4.1-20051029/bin/g++ -fmudflap -c -o hello.o hello.cpp ;
~/gcc4.1-20051029/bin/g++ -o hello hello.o -lmudflap

./hello
*******
mudflap violation 1 (check/write): time=1139437662.278029 ptr=0xb7e5e6a0 size=4
pc=0xb7e88322 location=`hello.cpp:6 (main)'
      /usr/lib/libmudflap.so.0(__mf_check+0x44) [0xb7e88322]
      ./hello(main+0x98) [0x804877c]
      /lib/tls/libc.so.6(__libc_start_main+0xd3) [0xbdae23]
number of nearby objects: 0
*******
mudflap violation 2 (check/read): time=1139437662.289586 ptr=0xbfb647f4 size=4
pc=0xb7e88322 location=`hello.cpp:7 (main)'
      /usr/lib/libmudflap.so.0(__mf_check+0x44) [0xb7e88322]
      ./hello(main+0x115) [0x80487f9]
      /lib/tls/libc.so.6(__libc_start_main+0xd3) [0xbdae23]
number of nearby objects: 0
*******
mudflap violation 3 (check/read): time=1139437662.290719 ptr=0xb7e5e6a0 size=4
pc=0xb7e88322 location=`hello.cpp:7 (main)'
      /usr/lib/libmudflap.so.0(__mf_check+0x44) [0xb7e88322]
      ./hello(main+0x199) [0x804887d]
      /lib/tls/libc.so.6(__libc_start_main+0xd3) [0xbdae23]
number of nearby objects: 0
1 ./hello
Hello, world!

To compile the snapshot, I did this:
  mkdir /tmp/gccobj
  cd /tmp/gccobj
  mkdir ~/gcc4.1-20051029
  ~/tmp/gcc-4.1-20051029/configure --prefix=/home/davel/gcc4.1-20051029
--enable-languages=c,c++
  make bootstrap-lean
  make install


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26120


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

* [Bug libmudflap/26120] mudflap behavior changes with trivial changes to build command
  2006-02-06 10:18 [Bug c++/26120] New: mudlap behavior changes with trivial changes to build command idht4n at hotmail dot com
                   ` (3 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-09  1:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-02-09 01:12 -------
oh, it wraps main:
--wrap=main

I don't know the correct behavior here is or not.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26120


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

* [Bug libmudflap/26120] mudflap behavior changes with trivial changes to build command
  2006-02-06 10:18 [Bug c++/26120] New: mudlap behavior changes with trivial changes to build command idht4n at hotmail dot com
                   ` (4 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: idht4n at hotmail dot com @ 2006-06-01 23:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from idht4n at hotmail dot com  2006-06-01 23:03 -------
Still behaves the same in 4.1.1 20060525 (Red Hat 4.1.1-1).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26120


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

* [Bug libmudflap/26120] mudflap behavior changes with trivial changes to build command
  2006-02-06 10:18 [Bug c++/26120] New: mudlap behavior changes with trivial changes to build command idht4n at hotmail dot com
                   ` (5 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-02  2:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2006-06-02 02:12 -------
g++f4 -o hello hello.o -lmudflap

You need both -fmudlfap and -lmudflap when linking.

This is not a bug.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26120


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

* [Bug libmudflap/26120] mudflap behavior changes with trivial changes to build command
  2006-02-06 10:18 [Bug c++/26120] New: mudlap behavior changes with trivial changes to build command idht4n at hotmail dot com
                   ` (6 preceding siblings ...)
  2006-06-02  2:12 ` pinskia at gcc dot gnu dot org
@ 2006-06-02 16:22 ` idht4n at hotmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: idht4n at hotmail dot com @ 2006-06-02 16:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from idht4n at hotmail dot com  2006-06-02 16:22 -------
(In reply to comment #7)
> g++f4 -o hello hello.o -lmudflap
> 
> You need both -fmudlfap and -lmudflap when linking.
> 
> This is not a bug.
> 

OK - mostly my bad then.  Sorry.  But if you need them both, why doesn't it
complain at compile time?  Instead it happily gives an executable that gives
bogus warnings, which IMHO is still a bug.


-- 


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).