public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/26864]  New: multithreaded mudflap not working
@ 2006-03-25  5:31 pr2345 at gmail dot com
  2006-03-25  7:20 ` [Bug libmudflap/26864] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: pr2345 at gmail dot com @ 2006-03-25  5:31 UTC (permalink / raw)
  To: gcc-bugs

gcc version: 
gcc (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8)

Sample program t1.c:
int main()
{
   int a[3] = { 1, 2, 3 };
   return a[3];
}

When I compile this with mudflap, it correctly reports an error:
$ gcc -fmudflap t1.c -lmudflap
$ a.out
*******
mudflap violation 1 (check/read): time=1143264091.275264 ptr=0xbf97b680 size=16
pc=0x5e8373 location=`s3.c:4 (main)'
      /usr/lib/libmudflap.so.0(__mf_check+0x44) [0x5e8373]
      a.out(main+0xa1) [0x8048751]
      /usr/lib/libmudflap.so.0(__wrap_main+0x1d8) [0x5e90be]
Nearby object 1: checked region begins 0B into and ends 4B after
mudflap object 0x8712380: name=`s3.c:3 (main) a'
bounds=[0xbf97b680,0xbf97b68b] size=12 area=stack check=3r/0w liveness=3
alloc time=1143264091.275229 pc=0x5e8e7a
number of nearby objects: 1

The manual recommends using -fmudflapth for multithreaded programs.  One thing
in the man page/online manual that is not clear is whether to link with
libmudflap or libmudflapth for multithreaded program.  Both libraries exist but
only libmudflap is mentioned in the manual.  This should be clarified.

In any case, when I link with either -lmudflap or -lmudflapth and compile with
-fmudflapth, a.out gives no output at all.

$ gcc -pthread -fmudflapth t1.c -lmudflapth
[ omitted irrelevant warnings about deprecated pthread_attr_getstackaddr ]
$ a.out
[ no output at all ]

$ gcc -pthread -fmudflapth t1.c -lmudflap
[ same ]
$ a.out
[ no output ]


-- 
           Summary: multithreaded mudflap not working
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pr2345 at gmail dot com
 GCC build triplet: same
  GCC host triplet: Linux 2.6 i386
GCC target triplet: same


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


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

* [Bug libmudflap/26864] multithreaded mudflap not working
  2006-03-25  5:31 [Bug c/26864] New: multithreaded mudflap not working pr2345 at gmail dot com
@ 2006-03-25  7:20 ` pinskia at gcc dot gnu dot org
  2006-04-22 15:42 ` fche at redhat dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-25  7:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-03-25 07:20 -------
This was reported to the list before (I cannot find it right now).


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |libmudflap


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


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

* [Bug libmudflap/26864] multithreaded mudflap not working
  2006-03-25  5:31 [Bug c/26864] New: multithreaded mudflap not working pr2345 at gmail dot com
  2006-03-25  7:20 ` [Bug libmudflap/26864] " pinskia at gcc dot gnu dot org
@ 2006-04-22 15:42 ` fche at redhat dot com
  2006-04-22 16:23 ` fche at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: fche at redhat dot com @ 2006-04-22 15:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from fche at redhat dot com  2006-04-22 15:42 -------
Indeed, -fmudflapth used to imply -fmudflap, but something broke that
association.  As a workaround, the test case works if both -fmudflap and
-fmudflapth are specified.


-- 

fche at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |fche at redhat dot com
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-04-22 15:42:15
               date|                            |


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


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

* [Bug libmudflap/26864] multithreaded mudflap not working
  2006-03-25  5:31 [Bug c/26864] New: multithreaded mudflap not working pr2345 at gmail dot com
                   ` (2 preceding siblings ...)
  2006-04-22 16:23 ` fche at gcc dot gnu dot org
@ 2006-04-22 16:23 ` fche at redhat dot com
  2006-04-25 23:29 ` pr2345 at gmail dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: fche at redhat dot com @ 2006-04-22 16:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from fche at redhat dot com  2006-04-22 16:22 -------
patch committed to mainline


-- 

fche at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING


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


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

* [Bug libmudflap/26864] multithreaded mudflap not working
  2006-03-25  5:31 [Bug c/26864] New: multithreaded mudflap not working pr2345 at gmail dot com
  2006-03-25  7:20 ` [Bug libmudflap/26864] " pinskia at gcc dot gnu dot org
  2006-04-22 15:42 ` fche at redhat dot com
@ 2006-04-22 16:23 ` fche at gcc dot gnu dot org
  2006-04-22 16:23 ` fche at redhat dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: fche at gcc dot gnu dot org @ 2006-04-22 16:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from fche at gcc dot gnu dot org  2006-04-22 16:22 -------
Subject: Bug 26864

Author: fche
Date: Sat Apr 22 16:22:54 2006
New Revision: 113179

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113179
Log:
2006-04-22  Frank Ch. Eigler  <fche@redhat.com>

        PR libmudflap/26864
        * common.opt (flag_mudflap_threads): Overload flag_mudflap.
        * tree-mudflap.c (flag_mudflap_threads): Derive from flag_mudflap.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/common.opt
    trunk/gcc/tree-mudflap.c


-- 


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


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

* [Bug libmudflap/26864] multithreaded mudflap not working
  2006-03-25  5:31 [Bug c/26864] New: multithreaded mudflap not working pr2345 at gmail dot com
                   ` (3 preceding siblings ...)
  2006-04-22 16:23 ` fche at redhat dot com
@ 2006-04-25 23:29 ` pr2345 at gmail dot com
  2006-06-18 17:16 ` tbm at cyrius dot com
  2008-01-26 13:26 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pr2345 at gmail dot com @ 2006-04-25 23:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pr2345 at gmail dot com  2006-04-25 23:29 -------
The man page/online manual also needs a small clarification.

It only mentions the libmudflap library and not libmudflapth.  I assume
a multithreaded program should link with -lmudflapth instead of -lmudflap?

Should I create a separate bug report for this, or can you take care of it
in the same one?


-- 


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


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

* [Bug libmudflap/26864] multithreaded mudflap not working
  2006-03-25  5:31 [Bug c/26864] New: multithreaded mudflap not working pr2345 at gmail dot com
                   ` (4 preceding siblings ...)
  2006-04-25 23:29 ` pr2345 at gmail dot com
@ 2006-06-18 17:16 ` tbm at cyrius dot com
  2008-01-26 13:26 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tbm at cyrius dot com @ 2006-06-18 17:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from tbm at cyrius dot com  2006-06-18 17:04 -------
Frank, are you also going to apply this patch to the 4.0 and 4.1 branches?


-- 

tbm at cyrius dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tbm at cyrius dot com, fche
                   |                            |at redhat dot com


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


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

* [Bug libmudflap/26864] multithreaded mudflap not working
  2006-03-25  5:31 [Bug c/26864] New: multithreaded mudflap not working pr2345 at gmail dot com
                   ` (5 preceding siblings ...)
  2006-06-18 17:16 ` tbm at cyrius dot com
@ 2008-01-26 13:26 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-26 13:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2008-01-26 12:35 -------
Not a regression, fixed for 4.2.0.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
      Known to fail|                            |4.1.3
         Resolution|                            |FIXED
   Target Milestone|---                         |4.2.0


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


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

end of thread, other threads:[~2008-01-26 12:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-25  5:31 [Bug c/26864] New: multithreaded mudflap not working pr2345 at gmail dot com
2006-03-25  7:20 ` [Bug libmudflap/26864] " pinskia at gcc dot gnu dot org
2006-04-22 15:42 ` fche at redhat dot com
2006-04-22 16:23 ` fche at gcc dot gnu dot org
2006-04-22 16:23 ` fche at redhat dot com
2006-04-25 23:29 ` pr2345 at gmail dot com
2006-06-18 17:16 ` tbm at cyrius dot com
2008-01-26 13:26 ` rguenth at gcc dot gnu dot org

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