Re: Preventing abort() and exit() calls in libpq
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Jacob Champion <pchampion@vmware.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Daniel Gustafsson <daniel@yesql.se>
Date: 2021-06-28T08:20:52Z
Lists: pgsql-hackers
>> +# Check for functions that libpq must not call. >> +# (If nm doesn't exist or doesn't work on shlibs, this test will silently >> +# do nothing, which is fine.) >> +.PHONY: check-libpq-refs >> +check-libpq-refs: $(shlib) >> + @! nm -A -g -u $< 2>/dev/null | grep -e abort -e exit > > "abort" and "exit" could be generic terms present in some other > libraries. Could be be better to match with "U abort" and "U exit" > instead? MinGW has a nm command, and it has a compatible option set, > so I think that it should work. A possible trick is to add ccp flags such as: -Dexit=exit_BAD -Dabort=abort_BAD. -- Fabien.
Commits
-
Further restrict the scope of no-exit()-in-libpq test.
- 792259591c0f 15.0 landed
-
Improve build-time check that libpq doesn't call exit().
- 2f7bae2f924d 15.0 landed
-
Fix portability fallout from commit dc227eb82.
- e45b0dfa1f10 15.0 landed
-
Add a build-time check that libpq doesn't call exit() or abort().
- dc227eb82ea8 15.0 landed