- Notifications
You must be signed in to change notification settings - Fork28
Commite3e3087
committed
Fix bogus code in contrib/ tsearch dictionary examples.
Both dict_int and dict_xsyn were blithely assuming that whatever memorypalloc gives back will be pre-zeroed. This would typically work forjust about long enough to run their regression tests, and no longer :-(.The pre-9.0 code in dict_xsyn was even lamer than that, as it wouldhappily give back a pointer to the result of palloc(0), encouragingits caller to access off the end of memory. Again, this would justbarely fail to fail as long as memory contained nothing but zeroes.Per a report from Rodrigo Hjort that code based on these examplesdidn't work reliably.1 parenta0d2f05 commite3e3087
2 files changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
| 248 | + | |
247 | 249 | | |
248 | 250 | | |
249 | 251 | | |
| |||
0 commit comments
Comments
(0)