Cloosen-Calories / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

Breakpad's libc-avoidance is not consistent #376

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This follows on from http://code.google.com/p/chromium/issues/detail?id=39292

The comments in minidump_writer.cc say:
// This code has to run in a compromised environment (the address space
// may have received SIGSEGV), thus the following rules apply:
//   * You may not enter the dynamic linker. This means that we cannot call
//     any symbols in a shared library (inc libc). Because of this we replace
//     libc functions in linux_libc_support.h.
//   * You may not call syscalls via the libc wrappers. This rule is a subset
//     of the first rule but it bears repeating. We have direct wrappers
//     around the system calls in linux_syscall_support.h.

However, linux/handler/exception_handler.cc uses these libc functions in a 
crashed context:
 * pthread_mutex_lock()
 * signal()
 * getpid()
 * memcpy() (though this is unavoidable according to 
http://code.google.com/p/chromium/wiki/LinuxCrashDumping)

Original issue reported on code.google.com by mseaborn@chromium.org on 25 Mar 2010 at 12:40

GoogleCodeExporter commented 9 years ago
One more:
 * syscall()

Original comment by mseaborn@chromium.org on 25 Mar 2010 at 2:05