public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29529]  New: purify with iostream reports 128 uninitialized memory reads
@ 2006-10-20 20:41 mstaley at lanl dot gov
  2006-10-20 21:34 ` [Bug libstdc++/29529] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mstaley at lanl dot gov @ 2006-10-20 20:41 UTC (permalink / raw)
  To: gcc-bugs

When I compile this code:

   #include <iostream>
   int main(void)
   {
   }

with g++, instrumented with the "purify" utility, purify reports
the following:

   UMR: Uninitialized memory read (128 times)
   This is occurring while in:
         __gconv_get_alias_db [libc.so.6]
         wctob          [libc.so.6]
         std::ctype< wchar_t>::_M_initialize_ctype( void) [libstdc++.so.6]
         std::ctype< wchar_t>::ctype( unsigned) [libstdc++.so.6]
         std::locale::_Impl::_Impl( unsigned) [libstdc++.so.6]
         std::locale::_Impl::_Impl( unsigned) [libstdc++.so.6]
   Reading 4 bytes from 0xbfa77a24 on the stack.
   Address 0xbfa77a24 is       84 bytes below frame pointer in function wctob

Dunno if this is a g++ problem, purify problem, OS problem, system
library problem, not really an error, or whatever, but it would be
nice to make it go away.

System/compiler info:

   uname -a
      Linux banat 2.6.15-26-686 #1 SMP PREEMPT Mon Jul 17 20:14:14 UTC 2006
      i686 GNU/Linux

   g++ --version
      g++ (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)

Without <iostream>, no problem.


-- 
           Summary: purify with iostream reports 128 uninitialized memory
                    reads
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mstaley at lanl dot gov


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


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

* [Bug libstdc++/29529] purify with iostream reports 128 uninitialized memory reads
  2006-10-20 20:41 [Bug c++/29529] New: purify with iostream reports 128 uninitialized memory reads mstaley at lanl dot gov
@ 2006-10-20 21:34 ` pinskia at gcc dot gnu dot org
  2006-10-25 22:39 ` mstaley at lanl dot gov
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-20 21:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-10-20 21:34 -------
This is most likely a purify problem.  Have you tried using valgrind instead?


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |libstdc++


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


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

* [Bug libstdc++/29529] purify with iostream reports 128 uninitialized memory reads
  2006-10-20 20:41 [Bug c++/29529] New: purify with iostream reports 128 uninitialized memory reads mstaley at lanl dot gov
  2006-10-20 21:34 ` [Bug libstdc++/29529] " pinskia at gcc dot gnu dot org
@ 2006-10-25 22:39 ` mstaley at lanl dot gov
  2006-10-26  4:22 ` pcarlini at suse dot de
  2006-10-28 22:34 ` pcarlini at suse dot de
  3 siblings, 0 replies; 5+ messages in thread
From: mstaley at lanl dot gov @ 2006-10-25 22:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from mstaley at lanl dot gov  2006-10-25 22:38 -------
(In reply to comment #1)
> This is most likely a purify problem.  Have you tried using valgrind instead?
> 

I just tried valgrind. I'm not really familiar with valgrind, but as far
as I can tell it reports no problems. So, either purify is wrong, valgrind
is wrong, or they're both wrong in different ways.


-- 


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


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

* [Bug libstdc++/29529] purify with iostream reports 128 uninitialized memory reads
  2006-10-20 20:41 [Bug c++/29529] New: purify with iostream reports 128 uninitialized memory reads mstaley at lanl dot gov
  2006-10-20 21:34 ` [Bug libstdc++/29529] " pinskia at gcc dot gnu dot org
  2006-10-25 22:39 ` mstaley at lanl dot gov
@ 2006-10-26  4:22 ` pcarlini at suse dot de
  2006-10-28 22:34 ` pcarlini at suse dot de
  3 siblings, 0 replies; 5+ messages in thread
From: pcarlini at suse dot de @ 2006-10-26  4:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pcarlini at suse dot de  2006-10-26 04:22 -------
(In reply to comment #2)
> I just tried valgrind. I'm not really familiar with valgrind, but as far
> as I can tell it reports no problems. So, either purify is wrong, valgrind
> is wrong, or they're both wrong in different ways.

Maybe "wrong" is too strong a statement, in this case. In practice, what often
makes a difference is that valgrind knows about many details of the GNU
environment (for instance about the underlying glibc) and is thus able to
automatically filter out many potential false positives. It does that via a
constantly updated so-called suppression file (see the manual, about that).
Anyway, I will double check myself in a few days...


-- 


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


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

* [Bug libstdc++/29529] purify with iostream reports 128 uninitialized memory reads
  2006-10-20 20:41 [Bug c++/29529] New: purify with iostream reports 128 uninitialized memory reads mstaley at lanl dot gov
                   ` (2 preceding siblings ...)
  2006-10-26  4:22 ` pcarlini at suse dot de
@ 2006-10-28 22:34 ` pcarlini at suse dot de
  3 siblings, 0 replies; 5+ messages in thread
From: pcarlini at suse dot de @ 2006-10-28 22:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pcarlini at suse dot de  2006-10-28 22:34 -------
Ok, I have double checked that both on 4.0.3 and the active branches everything
is fine per Valgrind (3.2.1). You may want to pass -v to Valgrind and look at
the "supp:" lines in the output, showing the used suppressions: interestingly,
one pretty commonly used is called "Ubuntu-stripped-ld.so", that is, it has
been added to cope with Ubuntu-specific false positives...


-- 

pcarlini at suse dot de changed:

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


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


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

end of thread, other threads:[~2006-10-28 22:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-20 20:41 [Bug c++/29529] New: purify with iostream reports 128 uninitialized memory reads mstaley at lanl dot gov
2006-10-20 21:34 ` [Bug libstdc++/29529] " pinskia at gcc dot gnu dot org
2006-10-25 22:39 ` mstaley at lanl dot gov
2006-10-26  4:22 ` pcarlini at suse dot de
2006-10-28 22:34 ` pcarlini at suse dot de

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