acimpoeru / google-glog

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

FailureSignalHandler should not call FlushLogFiles #133

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. InstallFailerHandler to glog
2. call abort() in custom malloc(such as tcmalloc) to indacite fatal error
3. dead lock will occur because FlushLogFiles call log_destination and 
log_destination call new, and the lock of malloc has been acquired by malloc

inline LogDestination* LogDestination::log_destination(LogSeverity severity) {
  assert(severity >=0 && severity < NUM_SEVERITIES);
  if (!log_destinations_[severity]) {
    log_destinations_[severity] = new LogDestination(severity, NULL);
  }
  return log_destinations_[severity];
}

What is the expected output? What do you see instead?
Add a non-mallocated log_destination_unsafe function

What version of the product are you using? On what operating system?
0.3.2

Please provide any additional information below.

Original issue reported on code.google.com by chen3feng on 1 Nov 2012 at 6:07

Attachments: