Closed
Description
Version
1.28.0
What happened?
sqlc generate crashes. It did work using sqlc 1.27.0
Relevant log output
$ sqlc generate
panic: start function[17] failed: wasm error: out of bounds memory access
wasm stack trace:
.$17()
goroutine 15 [running]:
github.com/wasilibs/go-pgquery/parser.newABI()
$HOME/go/pkg/mod/github.com/wasilibs/go-pgquery@v0.0.0-20241011013927-817756c5aae4/parser/parser_wazero.go:161 +0x15b0
github.com/wasilibs/go-pgquery/parser.getABI()
$HOME/go/pkg/mod/github.com/wasilibs/go-pgquery@v0.0.0-20241011013927-817756c5aae4/parser/parser_wazero.go:203 +0x14a
github.com/wasilibs/go-pgquery/parser.ParseToProtobuf({0xc000524800, 0x4345})
$HOME/go/pkg/mod/github.com/wasilibs/go-pgquery@v0.0.0-20241011013927-817756c5aae4/parser/parser_wazero.go:62 +0x52
github.com/wasilibs/go-pgquery.Parse({0xc000524800?, 0xc00054c000?})
$HOME/go/pkg/mod/github.com/wasilibs/go-pgquery@v0.0.0-20241011013927-817756c5aae4/pg_query.go:27 +0x18
github.com/sqlc-dev/sqlc/internal/engine/postgresql.(*Parser).Parse(0x0?, {0x1d9eb00?, 0xc0005a0fa0?})
$HOME/go/pkg/mod/github.com/sqlc-dev/sqlc@v1.28.0/internal/engine/postgresql/parse.go:154 +0x57
github.com/sqlc-dev/sqlc/internal/compiler.(*Compiler).parseCatalog(0xc000622a08, {0xc00008f7e0?, 0xc000602060?, 0xa?})
$HOME/go/pkg/mod/github.com/sqlc-dev/sqlc@v1.28.0/internal/compiler/compile.go:42 +0x238
github.com/sqlc-dev/sqlc/internal/compiler.(*Compiler).ParseCatalog(...)
$HOME/go/pkg/mod/github.com/sqlc-dev/sqlc@v1.28.0/internal/compiler/engine.go:68
github.com/sqlc-dev/sqlc/internal/cmd.parse({_, _}, {_, _}, {_, _}, {{0x0, 0x0}, {0xc000602060, 0xa}, ...}, ...)
$HOME/go/pkg/mod/github.com/sqlc-dev/sqlc@v1.28.0/internal/cmd/generate.go:308 +0x198
github.com/sqlc-dev/sqlc/internal/cmd.processQuerySets.func1()
$HOME/go/pkg/mod/github.com/sqlc-dev/sqlc@v1.28.0/internal/cmd/process.go:107 +0x81a
golang.org/x/sync/errgroup.(*Group).Go.func1()
$HOME/go/pkg/mod/golang.org/x/sync@v0.11.0/errgroup/errgroup.go:78 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1
$HOME/go/pkg/mod/golang.org/x/sync@v0.11.0/errgroup/errgroup.go:75 +0x93
What operating system are you using?
Linux
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go