ruby-duckdb
ruby-duckdb copied to clipboard
failed CI with ruby-asan
https://github.com/suketa/ruby-duckdb/actions/runs/12717079790/job/35452791974?pr=855
#16 0x7f60fd98da53 in duckdb_prepared_statement_execute /home/runner/work/ruby-duckdb/ruby-duckdb/tmp/x86_64-linux/duckdb_native/3.5.0/../../../../ext/duckdb/prepared_statement.c:113:9
Is the following code cause of error? https://github.com/suketa/ruby-duckdb/blob/4064bb2c09add0edb757931ac1c3092c00b9d5a4/ext/duckdb/prepared_statement.c#L113
The following code creates the error message when using ruby-asan
# frozen_string_literal: true
require 'duckdb'
def run_duckdb_asan_test
db = DuckDB::Database.open
con = db.connect
con.execute('INSERT INTO test VALUES (?, "hello")', 1) # raises DuckDB::Error
rescue Exception => e
p e
end
run_duckdb_asan_test
from https://github.com/suketa/ruby-duckdb/actions/runs/12727038118/job/35476088465?pr=855#step:9:26
The following code might be the reason?
https://github.com/suketa/ruby-duckdb/blob/18cd7b3025a65d24549a394cf4c4c1d8208f7dfe/ext/duckdb/prepared_statement.c#L92
The following code
require 'duckdb'
def run_duckdb_asan_test
db = DuckDB::Database.open
con = db.connect
stmt = DuckDB::PreparedStatement.new(con, 'INSERT INTO test VALUES (?, "hello")')
rescue Exception => e
p e
end
run_duckdb_asan_test