Re: BUG #16190: The usage of NULL pointer in refint.c
Michael Paquier <[email protected]> Tue, 7 Jan 2020 15:44:12 +0900
| Newsgroups | gmane.comp.db.postgresql.bugs |
|---|---|
| Message-ID | <[email protected]> |
--NzX0AQGjRQPusK/O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 06, 2020 at 06:26:54PM -0800, Andres Freund wrote: > On 2020-01-06 21:12:05 -0500, Tom Lane wrote: >> WFM. There are probably more elegant ways to do it than to drop this >> stuff into TopMemoryContext, but this is surely better than unchecked >> malloc calls. >=20 > Yea, it's certainly better than the current situation. An incremental > improvement would be to do the allocations in a separate contect, for eas= ier > debugging should there ever be a leak... Sure. I am not sure if that's worth the extra work though, so I would just be tempted to commit the patch that moves the allocation to TopMemoryContext and call it a day. Any objections to that? -- Michael --NzX0AQGjRQPusK/O Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl4UKLwACgkQnvQgOdby QH1x3A//f4dWGeLPy9xGv/VD/nbQPYLCzifrDwxpv7AHkjWx4I4p6M0yqUvX5wQG VDm4kYQzeWNXFeigkGpgLzXiTe/hF+wl+kc9p9Vk/s4fPHpT3tdu3HH2RTYHHhPh vwjLQ9uK/gHq1cz8bTz2jKX62VtIW50eWIcXqnXNeGBF1462AgXF7Uq7spwSIGNo lbYSTHzCNwBq7UThpegutr6Q4fKFbz5PI6lmSj+qk3EBSJvyoVE4I3W8C7N3dyfJ 1pepNeR9ajzojd9cSbLc46GkRR1U2CYP/H1m9nRktRBHM5Ej0YalM3iwEkP6wKrt OGAFJ9ZpVjfn4erpqqrEb6yVDnqJrutQo6SmcPRMM/JNljeS65qzf3kGIIwjDz1J txSSnlKPM7x051Laz6JttOdwM8kN6vJhRiEPQwkyl4aizcSRKzNM8Ocl79QzlsVe J7I/2y3luuOgAePO5PCmK0bMBsmfTOMElmH0TUmzkDNfeQW/Hjhi/evu92U7gaL+ ApJq6b25Dn9P4lWaIvNhATYkvITe9WYLbJQTXugQXpwjdXprPo5LNjdFyEuqfifs WGQbLdObaYf4N7fK58G3QHts0/NxLSi4pI0o8QrwxpP0g1fRPUH3NXEXSpJRQwck UJAVGrAWj7/Tqk2mO7I1YWbg/QxtmQ2oANapBP+KZSPV+z/FMlg= =XDz1 -----END PGP SIGNATURE----- --NzX0AQGjRQPusK/O--