WillAyd commented on code in PR #1093:
URL: https://github.com/apache/arrow-adbc/pull/1093#discussion_r1358706288
##########
c/driver/postgresql/postgresql_benchmark.cc:
##########
@@ -24,47 +24,56 @@
static void BM_PostgresqlExecute(benchmark::State& state) {
const char* uri = std::getenv("ADBC_POSTGRESQL_TEST_URI");
- if (!uri) {
+ if (!uri || !strcmp(uri, "")) {
Review Comment:
These are orthogonal but figured OK to lump in here given this is the first
PR using these benchmarks. Also happy to split off if you prefer
I noticed LSAN is not happy if we actually return now, for example if you
provide an invalid test_uri. Am I missing something extra I should be releasing
before these returns?
```
==96786==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 1024 byte(s) in 1 object(s) allocated from:
#0 0x7f0f1a0defef in __interceptor_malloc
../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7f0f19b28aaa in SetErrorVariadic
/home/willayd/clones/arrow-adbc/c/driver/common/utils.c:141
#2 0x7f0f19b283ac in SetError
/home/willayd/clones/arrow-adbc/c/driver/common/utils.c:110
#3 0x7f0f19a7ffcc in adbcpq::PostgresDatabase::Connect(pg_conn**,
AdbcError*) /home/willayd/clones/arrow-adbc/c/driver/postgresql/database.cc:107
#4 0x7f0f19a803d6 in
adbcpq::PostgresDatabase::RebuildTypeResolver(AdbcError*)
/home/willayd/clones/arrow-adbc/c/driver/postgresql/database.cc:135
#5 0x7f0f19a7fb23 in adbcpq::PostgresDatabase::Init(AdbcError*)
/home/willayd/clones/arrow-adbc/c/driver/postgresql/database.cc:58
#6 0x7f0f19ab59b1 in PostgresDatabaseInit
/home/willayd/clones/arrow-adbc/c/driver/postgresql/postgresql.cc:82
#7 0x7f0f19ab6766 in AdbcDatabaseInit
/home/willayd/clones/arrow-adbc/c/driver/postgresql/postgresql.cc:197
#8 0x560878af3271 in BM_PostgresqlExecute
/home/willayd/clones/arrow-adbc/c/driver/postgresql/postgresql_benchmark.cc:44
#9 0x560878b898bf in benchmark::internal::BenchmarkInstance::Run(long,
int, benchmark::internal::ThreadTimer*, benchmark::internal::ThreadManager*,
benchmark::internal::PerfCountersMeasurement*) const
(/home/willayd/clones/arrow-adbc/build/driver/postgresql/postgresql-benchmark+0x75a8bf)
(BuildId: 9c2b1c1be992ad8c4106282527e34c09b72aeb27)
#10 0x560878b673e3 in benchmark::internal::(anonymous
namespace)::RunInThread(benchmark::internal::BenchmarkInstance const*, long,
int, benchmark::internal::ThreadManager*,
benchmark::internal::PerfCountersMeasurement*)
(/home/willayd/clones/arrow-adbc/build/driver/postgresql/postgresql-benchmark+0x7383e3)
(BuildId: 9c2b1c1be992ad8c4106282527e34c09b72aeb27)
SUMMARY: AddressSanitizer: 1024 byte(s) leaked in 1 allocation(s).
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]