Probable memory leak with ECPG and AIX
Guillaume Lelarge <guillaume@lelarge.info>
From: Guillaume Lelarge <guillaume@lelarge.info>
To: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Cc: "Dr. Michael Meskes" <michael.meskes@credativ.com>
Date: 2021-12-10T14:40:50Z
Lists: pgsql-hackers
Attachments
- testcase.pgc (application/octet-stream)
- testcase.sh (application/x-shellscript)
Hello, Our customer thinks he has found a memory leak on ECPG and AIX. The code is quite simple. It declares a cursor, opens it, and fetches the only line available in the table many times. After some time, the client crashes with a segfault error. According to him, it consumed around 256MB. What's weird is that it works great on Linux, but crashed on AIX. One coworker thought it could be the compiler. Our customer used cc, but he also tried with gcc, and got the same error. The test case is attached (testcase.pgc is the ECPG code, testcase.sh is what our customer used to precompile and compile his code). Do you have any idea why that happens on AIX? Two queries to create the table and populate it with a single record: CREATE TABLE foo( key integer PRIMARY KEY, value character varying(20) ); INSERT INTO foo values (1, 'one'); Thanks. Regards. -- Guillaume.
Commits
-
Fix previous commit's ecpg_clocale for ppc Darwin.
- f5e4d64bb338 10.22 landed
- 1cad30e3ba82 11.17 landed
- a4240139fc76 12.12 landed
- 97b005f3fb1b 13.8 landed
- 8533eb181ae4 15.0 landed
- 463a841d7407 14.5 landed
- e2bc242833da 16.0 landed
-
ecpglib: call newlocale() once per process.
- d68b731a1504 11.17 landed
- 12b2a2369deb 10.22 landed
- b4d7e92bd535 13.8 landed
- 7a28f7cb09bf 15.0 landed
- 5e0b8f3f4f87 12.12 landed
- 5b94e2bd4d54 14.5 landed
- 5633836ef306 16.0 landed