acimpoeru / google-glog

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

SetVLOGLevel crashes due to recurrent mutex locking #172

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. call google::SetVLOGLevel("foo", 1);

What is the expected output? What do you see instead?
should not fail. instead it crashes with segfault.

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

Please provide any additional information below.
The reason for this is that SetVLOGLevel locks vmodule_lock mutex at line 
http://code.google.com/p/google-glog/source/browse/trunk/src/vlog_is_on.cc#165

and then later RAW_VLOG print at line 189 implicitly calls InitVLOG3__() which 
tries to lock the mutex and crashes.

The fix: to release the mutex before RAW_VLOG statement.

The workaround - to compile the package with STRIP_LOG statement.

Original issue reported on code.google.com by roma...@gmail.com on 31 Oct 2013 at 11:49

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
The patch is attached

Original comment by roma...@gmail.com on 31 Oct 2013 at 12:07

Attachments: