Add some debug support code to try to catch future mistakes in the area of
Tom Lane <tgl@sss.pgh.pa.us>
Add some debug support code to try to catch future mistakes in the area of input functions that include garbage bytes in their results. Provide a compile-time option RANDOMIZE_ALLOCATED_MEMORY to make palloc fill returned blocks with variable contents. This option also makes the parser perform conversions of literal constants twice and compare the results, emitting a WARNING if they don't match. (This is the code I used to catch the input function bugs fixed in the previous commit.) For the moment, I've set it to be activated automatically by --enable-cassert.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/parser/parse_type.c | modified | +33 −7 |
| src/backend/utils/mmgr/aset.c | modified | +52 −1 |
| src/include/pg_config_manual.h | modified | +13 −6 |