Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package guile-git for openSUSE:Factory checked in at 2022-12-19 14:08:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/guile-git (Old) and /work/SRC/openSUSE:Factory/.guile-git.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "guile-git" Mon Dec 19 14:08:04 2022 rev:8 rq:1043673 version:0.5.2 Changes: -------- --- /work/SRC/openSUSE:Factory/guile-git/guile-git.changes 2021-07-08 22:49:20.756039861 +0200 +++ /work/SRC/openSUSE:Factory/.guile-git.new.1835/guile-git.changes 2022-12-19 14:08:07.574621462 +0100 @@ -1,0 +2,9 @@ +Sun Dec 18 18:30:22 UTC 2022 - Dirk Müller <dmuel...@suse.com> + +- update to 0.5.2: + * Fix crash when fetching multiple sub-modules + This bug was reported at <https://issues.guix.gnu.org/48855>. It could + lead to crashes via SIGSEGV or SIGILL while fetching multiple + sub-modules in a row. + +------------------------------------------------------------------- Old: ---- guile-git-v0.5.1.tar.gz New: ---- guile-git-v0.5.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ guile-git.spec ++++++ --- /var/tmp/diff_new_pack.5gVWqj/_old 2022-12-19 14:08:08.034623845 +0100 +++ /var/tmp/diff_new_pack.5gVWqj/_new 2022-12-19 14:08:08.042623886 +0100 @@ -1,7 +1,7 @@ # # spec file for package guile-git # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: guile-git -Version: 0.5.1 +Version: 0.5.2 Release: 0 Summary: Guile bindings of libgit2 License: GPL-3.0-or-later ++++++ guile-git-v0.5.1.tar.gz -> guile-git-v0.5.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.5.1/NEWS new/guile-git-v0.5.2/NEWS --- old/guile-git-v0.5.1/NEWS 2021-04-20 11:44:41.000000000 +0200 +++ new/guile-git-v0.5.2/NEWS 2021-07-21 17:56:34.000000000 +0200 @@ -10,6 +10,16 @@ notice and this notice are preserved. This file is offered as-is, without any warranty. +* Changes in 0.5.2 (since 0.5.1) + +** Bug fix + +*** Fix crash when fetching multiple sub-modules + +This bug was reported at <https://issues.guix.gnu.org/48855>. It could +lead to crashes via SIGSEGV or SIGILL while fetching multiple +sub-modules in a row. + * Changes in 0.5.1 (since 0.5.0) ** Bug fix diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.5.1/configure.ac new/guile-git-v0.5.2/configure.ac --- old/guile-git-v0.5.1/configure.ac 2021-04-20 11:44:41.000000000 +0200 +++ new/guile-git-v0.5.2/configure.ac 2021-07-21 17:56:34.000000000 +0200 @@ -18,7 +18,7 @@ dnl You should have received a copy of the GNU General Public License dnl along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. -AC_INIT([Guile-Git], [0.5.1], [], [], [https://gitlab.com/guile-git/guile-git/]) +AC_INIT([Guile-Git], [0.5.2], [], [], [https://gitlab.com/guile-git/guile-git/]) AC_CONFIG_SRCDIR(git) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.5.1/git/structs.scm new/guile-git-v0.5.2/git/structs.scm --- old/guile-git-v0.5.1/git/structs.scm 2021-04-20 11:44:41.000000000 +0200 +++ new/guile-git-v0.5.2/git/structs.scm 2021-07-21 17:56:34.000000000 +0200 @@ -501,7 +501,7 @@ (define (pointer->config-entry pointer) "Return a <config-entry> record based on the 'git_config_entry' struct -pointed to by POINTER. The data pointed to be POINTER is not freed." +pointed to by POINTER. The data pointed to by POINTER is not freed." (define bs (pointer->bytestructure pointer %config-entry)) ;; Duplicate the structure POINTER refers to so that users can capture it @@ -718,9 +718,21 @@ 'download-tags (symbol->remote-autotag-option policy))) -(define (fetch-options-remote-callbacks fetch-options) - (%make-remote-callbacks - (bytestructure-ref (fetch-options-bytestructure fetch-options) 'callbacks))) +(define fetch-options-remote-callbacks + (let ((cache (make-weak-key-hash-table 20))) + (lambda (fetch-options) + "Return the <remote-callbacks> associated with FETCH-OPTIONS." + ;; This cache ensures that the <remote-callbacks> record remains live + ;; as long as FETCH-OPTIONS is live, which in turn allows + ;; 'set-remote-callbacks-transfer-progress!' to have a similar + ;; lifecycle hash table. + (or (hashq-ref cache fetch-options) + (let ((callbacks + (%make-remote-callbacks + (bytestructure-ref (fetch-options-bytestructure fetch-options) + 'callbacks)))) + (hashq-set! cache fetch-options callbacks) + callbacks))))) (define (set-remote-callbacks-credentials! callbacks credentials) (bytestructure-set! (remote-callbacks-bytestructure callbacks) @@ -741,15 +753,24 @@ -1)) '(* *))) + +(define %weak-references + ;; Weak references: values in this table must be kept live as long as their + ;; key is live. + (make-weak-key-hash-table 100)) + (define (set-remote-callbacks-transfer-progress! callbacks proc) "Set PROC as a transfer-progress callback in CALLBACKS. PROC will be called periodically as data if fetched from the remote, with one argument: an indexer progress record. PROC can cancel the on-going transfer by returning #f." - (bytestructure-set! (remote-callbacks-bytestructure callbacks) - 'transfer-progress - (pointer-address - (procedure->indexer-progress-callback proc)))) + (let ((ptr (procedure->indexer-progress-callback proc))) + ;; Make sure the pointer object remains live for as long as CALLBACKS; + ;; otherwise the underlying libffi closure could be finalized too early. + (hashq-set! %weak-references callbacks ptr) + (bytestructure-set! (remote-callbacks-bytestructure callbacks) + 'transfer-progress + (pointer-address ptr)))) (define (fetch-options-proxy-options fetch-options) "Return the <proxy-options> record associated with FETCH-OPTIONS." @@ -842,7 +863,12 @@ (let ((bs (submodule-update-options-bytestructure submodule-update-options)) (fetch-options-bs (fetch-options-bytestructure fetch-options))) (bytestructure-set! bs 'fetch-options - (bytestructure-bytevector fetch-options-bs)))) + (bytestructure-bytevector fetch-options-bs)) + + ;; FETCH-OPTIONS might contain things like pointers coming from + ;; 'procedure->pointer' (callbacks), which should be protected from GC as + ;; long as SUBMODULE-UPDATE-OPTIONS is live. + (hashq-set! %weak-references submodule-update-options fetch-options))) ;; git remote head diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.5.1/tests/ssh.scm.in new/guile-git-v0.5.2/tests/ssh.scm.in --- old/guile-git-v0.5.1/tests/ssh.scm.in 2021-04-20 11:44:41.000000000 +0200 +++ new/guile-git-v0.5.2/tests/ssh.scm.in 2021-07-21 17:56:34.000000000 +0200 @@ -36,7 +36,8 @@ (define (sshd-available?) ;; Return #t if sshd is available (it does not support ;; â--versionâ or anything similar though). - (= 256 (system* sshd "--something-not-supported"))) + (= 256 (parameterize ((current-error-port (%make-void-port "w"))) + (system* sshd "--something-not-supported")))) (define (start-sshd port) (define (write-authorized-keys file)