This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug manual/10441] New: Backtraces code example lacks error checking


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]