Skip to content

Commit bc7d684

Browse files
committed
trunk: change to kaldi-mutex.cc to be tolerant of the gcc/Haswell bug described at http://lists.opensuse.org/opensuse-bugs/2014-03/msg00137.html
git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@4335 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
1 parent 9fbe2e3 commit bc7d684

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/thread/kaldi-mutex.cc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,15 @@ Mutex::Mutex() {
3838
Mutex::~Mutex() {
3939
int ret;
4040
if ( (ret = pthread_mutex_destroy(&mutex_)) != 0) {
41-
KALDI_ERR << "Cannot destroy pthread mutex, error is: "
42-
<< strerror(ret);
41+
if (ret != 16) {
42+
KALDI_ERR << "Cannot destroy pthread mutex, error is: "
43+
<< strerror(ret);
44+
} else {
45+
KALDI_WARN << "Error destroying pthread mutex; ignoring it as it could be "
46+
<< "a known issue that affects Haswell processors, see "
47+
<< "http://lists.opensuse.org/opensuse-bugs/2014-03/msg00137.html "
48+
<< "If your processor is not Haswell, this is a bug.";
49+
}
4350
}
4451
}
4552

0 commit comments

Comments
 (0)