diff --git a/common/go.mod b/common/go.mod index e751185d8b..3b5f4c29a9 100644 --- a/common/go.mod +++ b/common/go.mod @@ -92,7 +92,7 @@ require ( github.com/kr/fs v0.1.0 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-runewidth v0.0.27 // indirect - github.com/mattn/go-sqlite3 v1.14.49 // indirect + github.com/mattn/go-sqlite3 v1.14.50 // indirect github.com/miekg/pkcs11 v1.1.2 // indirect github.com/mistifyio/go-zfs/v4 v4.0.0 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect diff --git a/common/go.sum b/common/go.sum index 066fe4398b..3c6bd8859e 100644 --- a/common/go.sum +++ b/common/go.sum @@ -145,8 +145,8 @@ github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo= github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg= github.com/mattn/go-runewidth v0.0.27 h1:Feg/Oou5zI/wnpgDF6omIU0OokC9GxLC/WRknhVlIR0= github.com/mattn/go-runewidth v0.0.27/go.mod h1:3qAiGCV4Koz/yuveO58qUefmUTRm8r0IGEXZ9jeHp/8= -github.com/mattn/go-sqlite3 v1.14.49 h1:B8jBHC3xhxZgxztrgruTuLucebnULQnx4W7cF7SAE9w= -github.com/mattn/go-sqlite3 v1.14.49/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w= +github.com/mattn/go-sqlite3 v1.14.50 h1:dmdFvo1XG4MPzA4IkAmE9upVz/Nj31uRoM5+jC8hYbY= +github.com/mattn/go-sqlite3 v1.14.50/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w= github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE= github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A= github.com/miekg/pkcs11 v1.1.2 h1:/VxmeAX5qU6Q3EwafypogwWbYryHFmF2RpkJmw3m4MQ= diff --git a/image/go.mod b/image/go.mod index c77a481b38..c476dd6a6f 100644 --- a/image/go.mod +++ b/image/go.mod @@ -22,7 +22,7 @@ require ( github.com/klauspost/compress v1.19.2 github.com/klauspost/pgzip v1.2.6 github.com/manifoldco/promptui v0.9.0 - github.com/mattn/go-sqlite3 v1.14.49 + github.com/mattn/go-sqlite3 v1.14.50 github.com/moby/moby/api v1.55.0 github.com/moby/moby/client v0.5.1 github.com/opencontainers/go-digest v1.0.0 diff --git a/image/go.sum b/image/go.sum index 95d7167cf7..6d19f7acbd 100644 --- a/image/go.sum +++ b/image/go.sum @@ -114,8 +114,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.27 h1:Feg/Oou5zI/wnpgDF6omIU0OokC9GxLC/WRknhVlIR0= github.com/mattn/go-runewidth v0.0.27/go.mod h1:3qAiGCV4Koz/yuveO58qUefmUTRm8r0IGEXZ9jeHp/8= -github.com/mattn/go-sqlite3 v1.14.49 h1:B8jBHC3xhxZgxztrgruTuLucebnULQnx4W7cF7SAE9w= -github.com/mattn/go-sqlite3 v1.14.49/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w= +github.com/mattn/go-sqlite3 v1.14.50 h1:dmdFvo1XG4MPzA4IkAmE9upVz/Nj31uRoM5+jC8hYbY= +github.com/mattn/go-sqlite3 v1.14.50/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w= github.com/miekg/pkcs11 v1.1.2 h1:/VxmeAX5qU6Q3EwafypogwWbYryHFmF2RpkJmw3m4MQ= github.com/miekg/pkcs11 v1.1.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mistifyio/go-zfs/v4 v4.0.0 h1:sU0+5dX45tdDK5xNZ3HBi95nxUc48FS92qbIZEvpAg4= diff --git a/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_vtable.go b/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_vtable.go index b2b2404bcb..90a025648c 100644 --- a/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_vtable.go +++ b/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_vtable.go @@ -423,8 +423,15 @@ func goVRelease(pVTab unsafe.Pointer, isDestroy C.int) *C.char { } else { err = vt.vTab.Disconnect() } - // The vtab is gone as far as SQLite is concerned regardless of the - // callback result, so release the handle either way. + if err != nil && isDestroy == 1 { + // SQLite retains p->pVtab when xDestroy fails and later calls + // xDisconnect on the same object; keep the handle registered so + // that call can resolve it (a missing handle panics above). + return mPrintf("%s", err.Error()) + } + // On xDisconnect (success or error) SQLite discards the vtab object, + // and on successful xDestroy it clears p->pVtab; release the handle + // in both cases. deleteHandle(pVTab) if err != nil { return mPrintf("%s", err.Error()) diff --git a/vendor/modules.txt b/vendor/modules.txt index e0078f6dc9..c74f0a5528 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -279,7 +279,7 @@ github.com/mattn/go-runewidth # github.com/mattn/go-shellwords v1.0.14 ## explicit; go 1.13 github.com/mattn/go-shellwords -# github.com/mattn/go-sqlite3 v1.14.49 +# github.com/mattn/go-sqlite3 v1.14.50 ## explicit; go 1.21 github.com/mattn/go-sqlite3 # github.com/miekg/pkcs11 v1.1.2