diff options
| author | Junio C Hamano <gitster@pobox.com> | 2018-11-21 22:57:50 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-11-21 22:57:50 +0900 |
| commit | e3c18aa35bf619e36efdea2f495756bcab597b8b (patch) | |
| tree | c7dfd185793394ca2d1cf5df7ed7eb98ff66e08e /pack-objects.c | |
| parent | 1bf5d99b12faad5c895e4807ee6485acddc453c3 (diff) | |
| parent | 34204c81668324480e1f34a09cce9c21fabf4b40 (diff) | |
| download | git-e3c18aa35bf619e36efdea2f495756bcab597b8b.tar.xz | |
Merge branch 'js/pack-objects-mutex-init-fix' into maint
A mutex used in "git pack-objects" were not correctly initialized
and this caused "git repack" to dump core on Windows.
* js/pack-objects-mutex-init-fix:
pack-objects (mingw): initialize `packing_data` mutex in the correct spot
pack-objects (mingw): demonstrate a segmentation fault with large deltas
pack-objects: fix typo 'detla' -> 'delta'
Diffstat (limited to 'pack-objects.c')
| -rw-r--r-- | pack-objects.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pack-objects.c b/pack-objects.c index 6ef87e5683..f73f609884 100644 --- a/pack-objects.c +++ b/pack-objects.c @@ -148,6 +148,9 @@ void prepare_packing_data(struct packing_data *pdata) 1U << OE_SIZE_BITS); pdata->oe_delta_size_limit = git_env_ulong("GIT_TEST_OE_DELTA_SIZE", 1UL << OE_DELTA_SIZE_BITS); +#ifndef NO_PTHREADS + pthread_mutex_init(&pdata->lock, NULL); +#endif } struct object_entry *packlist_alloc(struct packing_data *pdata, |
