Re: BUG #18960: Mistake in test test_simple_pipeline (libpq_pipeline.c) - Mailing list pgsql-bugs

From Dmitry Kovalenko
Subject Re: BUG #18960: Mistake in test test_simple_pipeline (libpq_pipeline.c)
Date
Msg-id 5ff4b743-b9ab-4406-92db-d6e00be2b301@postgrespro.ru
Whole thread Raw
In response to Re: BUG #18960: Mistake in test test_simple_pipeline (libpq_pipeline.c)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #18960: Mistake in test test_simple_pipeline (libpq_pipeline.c)
List pgsql-bugs
Hello Tom,

Thank you for your interest in this problem.

+    res = PQgetResult(conn);
+    if (res == NULL)
+        pg_fatal_impl(line, "PQgetResult returned null unexpectedly: %s",
+                      PQerrorMessage(conn));
+    if (PQresultStatus(res) != status)
+        pg_fatal_impl(line, "PQgetResult returned status %s, expected 
%s: %s",
+                      PQresStatus(PQresultStatus(res)),
+                      PQresStatus(status),
+                      PQerrorMessage(conn));
+    return res;

As I understand, you have leaks of 'res' when (PQresultStatus(res) != 
status)

I spent the some time to fix a leaks in tests and PG itself here:

https://github.com/dmitry-lipetsk/postgres/commits/D20250617_001-pg_master/

libpq_pipeline.c has not been finished yet but "make check" (under ASAN) 
can already executed without any problems.

I hope, you will find something useful in this branch.

For example, these problems are obvious and can be trivially fixed:

https://github.com/dmitry-lipetsk/postgres/commit/484ec68fcfea77beadc19387721d04ca77abe55f

https://github.com/dmitry-lipetsk/postgres/commit/3213f95cfd3e094d6ece4a9114f30f0204c0d056

https://github.com/dmitry-lipetsk/postgres/commit/0d4497a744bd00e741434aa6e307ed23f348fbc4

https://github.com/dmitry-lipetsk/postgres/commit/6f966657d7e9409dcbd8109d41bdc89f22024324 


I am planning to return and finish this work near time - I want to get a 
clean execution of "make check-world" under ASAN.

Thanks&Regards,

Dmitry Kovalenko




pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18960: Mistake in test test_simple_pipeline (libpq_pipeline.c)
Next
From: Tom Lane
Date:
Subject: Re: BUG #18960: Mistake in test test_simple_pipeline (libpq_pipeline.c)