public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/44435]  New: gengtype: don't test undefined value after vasprintf failure
@ 2010-06-06 13:40 jim at meyering dot net
  2010-06-06 13:41 ` [Bug c/44435] " jim at meyering dot net
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jim at meyering dot net @ 2010-06-06 13:40 UTC (permalink / raw)
  To: gcc-bugs

Harmless, but distracting...
This is present is the latest sources on trunk.

gengtype: don't test undefined value after vasprintf failure
While libiberty's asprintf function does guarantee that the pointer is
set to NULL upon asprintf failure, POSIX/glibc make no such guarantee.
* gengtype.c (xasprintf): Don't test an undefined value upon
vasprintf failure.
* gengtype.c (oprintf): Likewise.

Patch attached.


-- 
           Summary: gengtype: don't test undefined value after vasprintf
                    failure
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jim at meyering dot net


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


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

* [Bug c/44435] gengtype: don't test undefined value after vasprintf failure
  2010-06-06 13:40 [Bug c/44435] New: gengtype: don't test undefined value after vasprintf failure jim at meyering dot net
@ 2010-06-06 13:41 ` jim at meyering dot net
  2010-06-06 15:53 ` [Bug other/44435] " jsm28 at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jim at meyering dot net @ 2010-06-06 13:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jim at meyering dot net  2010-06-06 13:41 -------
Created an attachment (id=20851)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20851&action=view)
gengtype: don't test undefined value after vasprintf failure


-- 


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


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

* [Bug other/44435] gengtype: don't test undefined value after vasprintf failure
  2010-06-06 13:40 [Bug c/44435] New: gengtype: don't test undefined value after vasprintf failure jim at meyering dot net
  2010-06-06 13:41 ` [Bug c/44435] " jim at meyering dot net
@ 2010-06-06 15:53 ` jsm28 at gcc dot gnu dot org
  2010-06-07 18:14 ` dj at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2010-06-06 15:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jsm28 at gcc dot gnu dot org  2010-06-06 15:53 -------
If the libiberty maintainers won't review the xvasprintf patch, perhaps
a global reviewer could do so?  That would be better than fiddling with
local checks.

http://gcc.gnu.org/ml/gcc-patches/2009-11/msg01448.html
http://gcc.gnu.org/ml/gcc-patches/2009-11/msg01449.html


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |other


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


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

* [Bug other/44435] gengtype: don't test undefined value after vasprintf failure
  2010-06-06 13:40 [Bug c/44435] New: gengtype: don't test undefined value after vasprintf failure jim at meyering dot net
  2010-06-06 13:41 ` [Bug c/44435] " jim at meyering dot net
  2010-06-06 15:53 ` [Bug other/44435] " jsm28 at gcc dot gnu dot org
@ 2010-06-07 18:14 ` dj at redhat dot com
  2010-06-07 18:24 ` jim at meyering dot net
  2010-06-07 20:18 ` joseph at codesourcery dot com
  4 siblings, 0 replies; 6+ messages in thread
From: dj at redhat dot com @ 2010-06-07 18:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dj at redhat dot com  2010-06-07 18:14 -------
Subject: Re:  gengtype: don't test undefined value after vasprintf failure


> If the libiberty maintainers won't review the xvasprintf patch,

I did: http://gcc.gnu.org/ml/gcc-patches/2009-08/msg00589.html


-- 


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


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

* [Bug other/44435] gengtype: don't test undefined value after vasprintf failure
  2010-06-06 13:40 [Bug c/44435] New: gengtype: don't test undefined value after vasprintf failure jim at meyering dot net
                   ` (2 preceding siblings ...)
  2010-06-07 18:14 ` dj at redhat dot com
@ 2010-06-07 18:24 ` jim at meyering dot net
  2010-06-07 20:18 ` joseph at codesourcery dot com
  4 siblings, 0 replies; 6+ messages in thread
From: jim at meyering dot net @ 2010-06-07 18:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jim at meyering dot net  2010-06-07 18:24 -------
Good!  I see that there's already a patch to deal with all of the unchecked
asprintf calls, too.


-- 


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


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

* [Bug other/44435] gengtype: don't test undefined value after vasprintf failure
  2010-06-06 13:40 [Bug c/44435] New: gengtype: don't test undefined value after vasprintf failure jim at meyering dot net
                   ` (3 preceding siblings ...)
  2010-06-07 18:24 ` jim at meyering dot net
@ 2010-06-07 20:18 ` joseph at codesourcery dot com
  4 siblings, 0 replies; 6+ messages in thread
From: joseph at codesourcery dot com @ 2010-06-07 20:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from joseph at codesourcery dot com  2010-06-07 20:17 -------
Subject: Re:  gengtype: don't test undefined value after
 vasprintf failure

On Mon, 7 Jun 2010, dj at redhat dot com wrote:

> > If the libiberty maintainers won't review the xvasprintf patch,
> 
> I did: http://gcc.gnu.org/ml/gcc-patches/2009-08/msg00589.html

That's a review of an older version.  The URLs I gave were of a version a 
different person updated to take account of your original review comments.


-- 


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


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

end of thread, other threads:[~2010-06-07 20:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-06 13:40 [Bug c/44435] New: gengtype: don't test undefined value after vasprintf failure jim at meyering dot net
2010-06-06 13:41 ` [Bug c/44435] " jim at meyering dot net
2010-06-06 15:53 ` [Bug other/44435] " jsm28 at gcc dot gnu dot org
2010-06-07 18:14 ` dj at redhat dot com
2010-06-07 18:24 ` jim at meyering dot net
2010-06-07 20:18 ` joseph at codesourcery 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).