Status: Unconfirmed
Owner: ----
Labels: OS-Linux Area-Misc Size-Medium Type-Bug

New issue 22076 by jason.hatton: base/debug_util_posix.cc:119: error: the  
address of ‘int backtrace(void**, int)’ will never be NULL
http://code.google.com/p/chromium/issues/detail?id=22076

Chrome Version       : r26404
OS + version :       Ubuntu 8.04/Ubuntu 8.04/Gentoo (3 computers)
CPU architecture : 64-bit
window manager : n/a
URLs (if applicable) :
Behavior in Firefox 3.x (if applicable):
Behavior in Chrome for Windows (optional):
GCC: gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
Build: gyp with make files

What steps will reproduce the problem?
1. make -r chrome

What is the expected result?
Clean compile

What happens instead?
   CXX /home/jhatton/code/chrome/src/out/Release/obj/base/debug_util_posix.o
cc1plus: warnings being treated as errors
base/debug_util_posix.cc: In constructor ‘StackTrace::StackTrace()’:
base/debug_util_posix.cc:119: error: the address of ‘int backtrace(void**,
int)’ will never be NULL
base/debug_util_posix.cc: In member function ‘void
StackTrace::PrintBacktrace()’:
base/debug_util_posix.cc:129: error: the address of ‘void
backtrace_symbols_fd(void* const*, int, int)’ will never be NULL
base/debug_util_posix.cc: In member function ‘void
StackTrace::OutputToStream(std::ostream*)’:
base/debug_util_posix.cc:136: error: the address of ‘char**
backtrace_symbols(void* const*, int)’ will never be NULL
make: ***
[/home/jhatton/code/chrome/src/out/Release/obj/base/debug_util_posix.o]  
Error 1


Please provide any additional information below. Attach a screenshot
and backtrace if possible.

Offending code snipped:

StackTrace::StackTrace() {
   if (backtrace == NULL) { // Warning/error on this line
     count_ = 0;
   } else {
     // Though the backtrace API man page does not list any possible negative
     // return values, we take no chance.
     count_ = std::max(backtrace(trace_, arraysize(trace_)), 0);
   }
}


I apologize if this is a stupid bug, but it did break chrome on 3 of my
computers :(

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to