projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d93a791
)
ThreadLocalDetail: fix bug just introduced w/ recent change to constexpr-ctor style...
author
Steve O'Brien
<steveo@fb.com>
Wed, 2 Dec 2015 17:17:38 +0000
(09:17 -0800)
committer
facebook-github-bot-1
<folly-bot@fb.com>
Wed, 2 Dec 2015 18:20:21 +0000
(10:20 -0800)
Summary: Small, silly bug which is triggered when there are no keys to unregister, invalidating the current size of the structure.
Reviewed By: yzhan
Differential Revision:
D2712604
fb-gh-sync-id:
f6f031936d8e4e458b49c08714f42cb2eec4c4fe
folly/detail/ThreadLocalDetail.h
patch
|
blob
|
history
diff --git
a/folly/detail/ThreadLocalDetail.h
b/folly/detail/ThreadLocalDetail.h
index 69d2cabd0d3c1baf73802405fcf5bc645d107e58..1c3f2c72e482be399e9ee73439985dbe7beec712 100644
(file)
--- a/
folly/detail/ThreadLocalDetail.h
+++ b/
folly/detail/ThreadLocalDetail.h
@@
-184,8
+184,8
@@
class PthreadKeyUnregister {
~PthreadKeyUnregister() {
std::lock_guard<std::mutex> lg(mutex_);
- while (size_
--
) {
- pthread_key_delete(keys_[size_]);
+ while (size_) {
+ pthread_key_delete(keys_[
--
size_]);
}
}