aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2017-07-01 12:14:05 +0200
committerMathieu Othacehe <m.othacehe@gmail.com>2017-07-01 16:32:42 +0200
commitb02469d298d84c665a1970f6462fe241cb4d2150 (patch)
tree767bc01de8a7496f8083d062d5409cdb47a5b981
parentba773f65f0ed3e47b7f63e8968945fb180fbb71e (diff)
downloadpatches-b02469d298d84c665a1970f6462fe241cb4d2150.tar
patches-b02469d298d84c665a1970f6462fe241cb4d2150.tar.gz
guix: git: Stop using libgit2-shutdown.
* guix/git.scm (with-libgit2): Stop calling (libgit2-shutdown) to prevent segfaults when pointer finalizers are run.
-rw-r--r--guix/git.scm13
1 files changed, 6 insertions, 7 deletions
diff --git a/guix/git.scm b/guix/git.scm
index 17a6784aef..406c817341 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -34,13 +34,12 @@
(make-parameter "/var/cache/guix/checkouts"))
(define-syntax-rule (with-libgit2 thunk ...)
- (dynamic-wind
- (lambda ()
- (libgit2-init!))
- (lambda ()
- thunk ...)
- (lambda ()
- (libgit2-shutdown))))
+ (begin
+ ;; XXX: The right thing to do would be to call (libgit2-shutdown) here,
+ ;; but pointer finalizers used in guile-git may be called after shutdown,
+ ;; resulting in a segfault. Hence, let's skip shutdown call for now.
+ (libgit2-init!)
+ thunk ...))
(define* (url-cache-directory url
#:optional (cache-directory