Hi folks,
It seems that I can reliably segfault recent Pike 8.1 installs when using sprintf-style SQLite queries:
$ echo ' create table demo(a, b); insert into demo(a, b) values(1, "abc")' | sqlite3 demo.db
$ pike Pike v8.1 release 13 running Hilfe v3.5 [...] > Sql.Sql db = Sql.Sql("sqlite://demo.db"); > db->query("select * from demo"); (1) Result: ({ /* 1 element */ ([ /* 2 elements */ "a": "1", "b": "abc" ]) }) > db->query("select * from demo where a = :a", ([":a": 1 ])); (2) Result: ({ /* 1 element */ ([ /* 2 elements */ "a": "1", "b": "abc" ]) }) > db->query("select * from demo where a = %d", 1); Segmentation fault
This occurs on both macOS and Linux; on macOS, segfaults are observed when the SQLite module is linked against either MacPorts' SQLite 3 or the system wide dylib in /usr/lib.
Note that query() with a mapping argument doesn't segfault; furthermore, no such segfault occurs under Pike v8.0 release 702.
Please let me know whether this is reproducible (and/or whether more information is required).
Thanks, Marc