public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug manual/10441] New: Backtraces code example lacks error checking
@ 2009-07-24 13:39 christian dot convey at navy dot mil
  0 siblings, 0 replies; only message in thread
From: christian dot convey at navy dot mil @ 2009-07-24 13:39 UTC (permalink / raw)
  To: glibc-bugs

On this page:  
   http://www.gnu.org/software/libc/manual/html_node/Backtraces.html
there's a code example near the bottom of the page.

That code makes use of the return value from "backtrace_symbols", without 
first checking if the returned pointer is NULL.

You might argue that this code is just to get the general idea across, and is 
rightfully devoid of error checking.  That's obviously an editorial decision.  
What I can say is that, perhaps like many other people, I followed that 
example's structure without giving it much more thought, and in doing so 
unwittingly introducing a bug into my application.  So for that reason you 
might want to add error handling to the example code.

-- 
           Summary: Backtraces code example lacks error checking
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: manual
        AssignedTo: roland at gnu dot org
        ReportedBy: christian dot convey at navy dot mil
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10441

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-24 13:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-24 13:39 [Bug manual/10441] New: Backtraces code example lacks error checking christian dot convey at navy dot mil

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