Re: Probable memory leak with ECPG and AIX
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: Guillaume Lelarge <guillaume@lelarge.info>, Benoit Lobréau <benoit.lobreau@gmail.com>, PostgreSQL Developers <pgsql-hackers@postgresql.org>, "Dr. Michael Meskes" <michael.meskes@credativ.com>
Date: 2022-07-03T03:37:08Z
Lists: pgsql-hackers
Noah Misch <noah@leadboat.com> writes: > Thanks for reviewing. Pushed with that comment. prairiedog complains[1]: > ld: common symbols not allowed with MH_DYLIB output format with the -multi_module option > connect.o definition of common _ecpg_clocale (size 4) Blah. > I bet this would fix it: > -locale_t ecpg_clocale; > +locale_t ecpg_clocale = (locale_t) 0; Hmm, I was considering suggesting that just on stylistic grounds, but decided it was too nitpicky even for me. Do you want me to test it on prairiedog? > I hear[1] adding -fno-common to compiler options would also fix that. I've got -fno-common turned on on my other macOS animals, but in those cases I did it to detect bugs not fix them. I'm not sure whether prairiedog's ancient toolchain has that switch at all, or whether it behaves the same as in more recent platforms. Still, that gcc.gnu.org message you cite is of the right era. regards, tom lane
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