suketa

Results 57 comments of suketa

@coderabbitai The expected behavior is the following. (raise DuckDB::Error) ``` $ ruby -Ilib test/duckdb_test/ruby_asan_test.rb # ``` But CI with ruby-asan failed with AddressSanitizer error. How we can fix it?

@coderabbitai I think CI failed because of our C code is accessing invalid memory. Can we fix CI failure by fixing ruby-duckdb C code without changing run_duckdb_asan_test method.

@coderabbitai Thank you for your advise. I fixed by https://github.com/suketa/ruby-duckdb/pull/870/commits/0e9d21c54feae28e13dcb92929fad72508af8259

@coderabbitai Unfortunately we can't fix AddressSanitizer error. Do you have any idea to fix this issue by changing ruby-duckdb C code? ``` Run env RUBYOPT=-W:deprecated ruby -Ilib test/duckdb_test/ruby_asan_test.rb env RUBYOPT=-W:deprecated...

@coderabbitai We already clean up the ctx->prepared_statement in the following code. https://github.com/suketa/ruby-duckdb/blob/9402183e2656d2ca17f3c411a3e3b77fa5a3da9f/ext/duckdb/prepared_statement.c#L43-L47 So we don't need to call duckdb_destroy_prepare.

@coderabbitai Thank you for your suggestion!!! > // Note: We don't need to free error_message as rb_raise never returns But I think we should need free error_message. The reason is...

@coderabbitai ``` rb_exc_raise(rb_exc_new2(eDuckDBError, error_message)); free(error_message); // This will be executed if the exception is caught ``` Unfortunately, `free` never executed after calling rb_exc_raise function. we should find out another solution...

@coderabbitai Can we refactor the following part? It seems to me that the following part is not so simple. ``` // Try to prepare the statement if (duckdb_prepare(ctxcon->con, StringValuePtr(query), &prepared_statement)...

@coderabbitai Hmmm Can you check https://github.com/suketa/ruby-duckdb/actions/runs/12959429708/job/36151624797?pr=870 and investigate it from scratch? And Can you provide the solution to fix it?

@coderabbitai I changed the code https://github.com/suketa/ruby-duckdb/pull/870/commits/7eec7ad621bcaeb386a9ae81404494685b072a32 But we still got the same error ;_; Is it difficult for us to fix it? Do we give it up now? https://github.com/suketa/ruby-duckdb/actions/runs/12962212577/job/36158420216?pr=870