bump modernc.org/sqlite to v1.35.0-concurrency-workaround (#3797)

This commit is contained in:
kim 2025-02-14 16:54:10 +00:00 committed by GitHub
commit ebbdeee0bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
114 changed files with 891873 additions and 192475 deletions

View file

@ -13,7 +13,6 @@ import (
"runtime"
"runtime/debug"
"strings"
"syscall"
gotime "time"
"unsafe"
@ -41,6 +40,8 @@ var (
in6_addr_any in.In6_addr
)
type syscallErrno = unix.Errno
// // Keep these outside of the var block otherwise go generate will miss them.
var X__stderrp = Xstdout
var X__stdinp = Xstdin
@ -445,7 +446,7 @@ func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
}
const retry = 5
var err syscall.Errno
var err syscallErrno
for i := 0; i < retry; i++ {
var n uintptr
switch n, _, err = unix.Syscall(unix.SYS_WRITE, uintptr(fd), buf, uintptr(count)); err {
@ -916,7 +917,7 @@ func Xfileno(t *TLS, stream uintptr) int32 {
panic(todo(""))
}
func newCFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) uintptr {
func newCFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscallErrno) uintptr {
p := Xcalloc(t, 1, types.Size_t(unsafe.Sizeof(fts.FTSENT{})))
if p == 0 {
panic("OOM")
@ -1322,7 +1323,7 @@ func Xabort(t *TLS) {
// (*signal.Sigaction)(unsafe.Pointer(p)).F__sigaction_u.F__sa_handler = signal.SIG_DFL
// Xsigaction(t, signal.SIGABRT, p, 0)
// Xfree(t, p)
// unix.Kill(unix.Getpid(), syscall.Signal(signal.SIGABRT))
// unix.Kill(unix.Getpid(), unix.Signal(signal.SIGABRT))
// panic(todo("unrechable"))
}
@ -1552,7 +1553,7 @@ func Xreaddir64(t *TLS, dir uintptr) uintptr {
return Xreaddir(t, dir)
}
func __syscall(r, _ uintptr, errno syscall.Errno) long {
func __syscall(r, _ uintptr, errno syscallErrno) long {
if errno != 0 {
return long(-errno)
}
@ -1787,7 +1788,7 @@ func Xpipe(t *TLS, pipefd uintptr) int32 {
trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
}
var a [2]int
if err := syscall.Pipe(a[:]); err != nil {
if err := unix.Pipe(a[:]); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
}
@ -1814,7 +1815,7 @@ func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, off
if __ccgo_strace {
trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
}
// Cannot avoid the syscall here, addr sometimes matter.
// Cannot avoid the unix here, addr sometimes matter.
data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
if err != 0 {
if dmesgs {