Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/index-pack-threading-races' into maint
author
Junio C Hamano
<gitster@pobox.com>
Tue, 30 Sep 2014 05:09:24 +0000
(22:09 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 30 Sep 2014 05:09:24 +0000
(22:09 -0700)
When receiving an invalid pack stream that records the same object
twice, multiple threads got confused due to a race.
* jk/index-pack-threading-races:
index-pack: fix race condition with duplicate bases
1
2
builtin/index-pack.c
patch
|
diff1
|
diff2
|
blob
|
history
raw
|
combined
(merge:
0605170
ab791dd
)
diff --cc
builtin/index-pack.c
index 5568a5bc3b69be79f0d5fa09c694fd976c8319cc,885fa93fd3038ad67ea1d74ea7562843efe3ec2a..eebf1a8fc21fd551f3917ad23ab5a45dff302f23
---
1
/
builtin/index-pack.c
---
2
/
builtin/index-pack.c
+++ b/
builtin/index-pack.c
@@@
-157,10
-157,9
+162,11
@@@
static void cleanup_thread(void
pthread_mutex_destroy(&read_mutex);
pthread_mutex_destroy(&counter_mutex);
pthread_mutex_destroy(&work_mutex);
+ pthread_mutex_destroy(&type_cas_mutex);
if (show_stat)
pthread_mutex_destroy(&deepest_delta_mutex);
+ for (i = 0; i < nr_threads; i++)
+ close(thread_data[i].pack_fd);
pthread_key_delete(key);
free(thread_data);
}