Reopened

The problem is that the sqlite3_error_offset() routine is returning a valid
that is out-of-range for its input.  Two errors:  First, the
sqlite3_error_offset() is returning an out-of-range value.  Second, the
CLI code that uses sqlite3_error_offset() is failing to properly deal with the
out-of-range return value.

Reproducible test case (run under valgrind):

> ~~~~
CREATE TABLE t1 AS SELECT *,*,*,*,*,*,* FROM sqlite_schema;
ALTER TABLE t1 ADD path GENERATED ALWAYS AS (no_such_function(1));
SELECT * FROM t1;
~~~~