public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libmudflap/21023] New: mudflap reports errors
@ 2005-04-14 16:17 hermantenbrugge at home dot nl
2005-05-08 5:23 ` [Bug libmudflap/21023] mudflap reports errors for external variables hermantenbrugge at home dot nl
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: hermantenbrugge at home dot nl @ 2005-04-14 16:17 UTC (permalink / raw)
To: gcc-bugs
Yesterday I upgraded my fedora core 3 instalation and got gcc4 installed.
I tested the mudflap code and found a problem. The reduced test case is
below.
when I have two programs a.c and b.c
-- a.c --
typedef struct { char *name; } dummy;
dummy d[] = { {"a"}, {0} };
-- b.c --
typedef struct { char *name; } dummy;
extern dummy d[];
int
main (void)
{
dummy *pd = d;
while (pd->name)
{
printf ("%s\n", pd->name);
pd++;
}
}
and compile this with:
gcc4 -fmudflap a.c b.c -o a -lmudflap
when I run the program I get:
a
*******
mudflap violation 1 (check/read): time=1113495140.046642 ptr=0x8049a00 size=4
pc=0xb7eff322 location=`b.c:9 (main)'
/usr/lib/libmudflap.so.0(__mf_check+0x44) [0xb7eff322]
./a(main+0x8b) [0x8048787]
/usr/lib/libmudflap.so.0(__wrap_main+0x1d8) [0xb7f0004e]
Nearby object 1: checked region begins 8B before and ends 5B before
mudflap object 0x80ca090: name=`__mf_lc_mask'
bounds=[0x8049a08,0x8049a0b] size=4 area=no-access check=0r/0w liveness=0
alloc time=1113495140.046375 pc=0xb7effe0a
Nearby object 2: checked region begins 16B before and ends 13B before
mudflap object 0x80ca028: name=`__mf_lookup_cache'
bounds=[0x8049a10,0x80c9a0f] size=524288 area=no-access check=0r/0w liveness=0
alloc time=1113495140.046371 pc=0xb7effe0a
number of nearby objects: 2
There should be no error.
I think the problem is in tree-mudflap.c in function mudflap_finish_file.
Here is a check for TREE_STATIC. I think this should be !TREE_PUBLIC ???
I assigned this to 4.0.1 because I probably can not assign this to 4.0.0
anymore?
--
Summary: mudflap reports errors
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libmudflap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hermantenbrugge at home dot nl
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-redhat-linux
GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21023
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libmudflap/21023] mudflap reports errors for external variables
2005-04-14 16:17 [Bug libmudflap/21023] New: mudflap reports errors hermantenbrugge at home dot nl
@ 2005-05-08 5:23 ` hermantenbrugge at home dot nl
2005-05-08 8:17 ` [Bug libmudflap/21023] mudflap reports errors for external array variable with no size specified pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: hermantenbrugge at home dot nl @ 2005-05-08 5:23 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|mudflap reports errors |mudflap reports errors for
| |external variables
Version|4.0.1 |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21023
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libmudflap/21023] mudflap reports errors for external array variable with no size specified
2005-04-14 16:17 [Bug libmudflap/21023] New: mudflap reports errors hermantenbrugge at home dot nl
2005-05-08 5:23 ` [Bug libmudflap/21023] mudflap reports errors for external variables hermantenbrugge at home dot nl
@ 2005-05-08 8:17 ` pinskia at gcc dot gnu dot org
2005-06-14 19:12 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-08 8:17 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|mudflap reports errors for |mudflap reports errors for
|external variables |external array variable with
| |no size specified
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21023
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libmudflap/21023] mudflap reports errors for external array variable with no size specified
2005-04-14 16:17 [Bug libmudflap/21023] New: mudflap reports errors hermantenbrugge at home dot nl
2005-05-08 5:23 ` [Bug libmudflap/21023] mudflap reports errors for external variables hermantenbrugge at home dot nl
2005-05-08 8:17 ` [Bug libmudflap/21023] mudflap reports errors for external array variable with no size specified pinskia at gcc dot gnu dot org
@ 2005-06-14 19:12 ` cvs-commit at gcc dot gnu dot org
2005-06-14 19:13 ` fche at redhat dot com
2005-06-14 19:16 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-06-14 19:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-06-14 19:12 -------
Subject: Bug 21023
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: fche@gcc.gnu.org 2005-06-14 19:12:24
Modified files:
gcc : ChangeLog tree-mudflap.c
libmudflap : ChangeLog
libmudflap/testsuite/libmudflap.c: cfrags.exp
Added files:
libmudflap/testsuite/libmudflap.c: externs-1.c externs-2.c
externs.exp
Log message:
2005-06-14 Frank Ch. Eigler <fche@redhat.com>
PR mudflap/21023
* tree-mudflap.c (mudflap_finish_file): Exclude non-public
rather than static objects (!) from libmudflap registration.
* testsuite/libmudflap.c/externs.exp, externs-{1,2}.c: New test files.
* testsuite/libmudflap.c/cfrags.exp: Bypass new sources.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9145&r2=2.9146
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-mudflap.c.diff?cvsroot=gcc&r1=2.43&r2=2.44
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libmudflap/ChangeLog.diff?cvsroot=gcc&r1=1.59&r2=1.60
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libmudflap/testsuite/libmudflap.c/externs-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libmudflap/testsuite/libmudflap.c/externs-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libmudflap/testsuite/libmudflap.c/externs.exp.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libmudflap/testsuite/libmudflap.c/cfrags.exp.diff?cvsroot=gcc&r1=1.4&r2=1.5
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21023
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libmudflap/21023] mudflap reports errors for external array variable with no size specified
2005-04-14 16:17 [Bug libmudflap/21023] New: mudflap reports errors hermantenbrugge at home dot nl
` (2 preceding siblings ...)
2005-06-14 19:12 ` cvs-commit at gcc dot gnu dot org
@ 2005-06-14 19:13 ` fche at redhat dot com
2005-06-14 19:16 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: fche at redhat dot com @ 2005-06-14 19:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From fche at redhat dot com 2005-06-14 19:13 -------
the suggestion seemed to work, thank you!
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21023
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libmudflap/21023] mudflap reports errors for external array variable with no size specified
2005-04-14 16:17 [Bug libmudflap/21023] New: mudflap reports errors hermantenbrugge at home dot nl
` (3 preceding siblings ...)
2005-06-14 19:13 ` fche at redhat dot com
@ 2005-06-14 19:16 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-14 19:16 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21023
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-06-14 19:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-14 16:17 [Bug libmudflap/21023] New: mudflap reports errors hermantenbrugge at home dot nl
2005-05-08 5:23 ` [Bug libmudflap/21023] mudflap reports errors for external variables hermantenbrugge at home dot nl
2005-05-08 8:17 ` [Bug libmudflap/21023] mudflap reports errors for external array variable with no size specified pinskia at gcc dot gnu dot org
2005-06-14 19:12 ` cvs-commit at gcc dot gnu dot org
2005-06-14 19:13 ` fche at redhat dot com
2005-06-14 19:16 ` pinskia 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).