forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit80ca846
committed
Fix list-manipulation bug in WITH RECURSIVE processing.
makeDependencyGraphWalker and checkWellFormedRecursionWalkerthought they could hold onto a pointer to a list's firstcons cell while the list was modified by recursive calls.That was okay when the cons cell was actually separatelypalloc'd ... but since commit1cff1b9, it's quite unsafe,leading to core dumps or incorrect complaints of faultyWITH nesting.In the field this'd require at least a seven-deep WITH nestto cause an issue, but enabling DEBUG_LIST_MEMORY_USAGEallows the bug to be seen with lesser nesting depths.Per bug #16801 from Alexander Lakhin. Back-patch to v13.Michael Paquier and Tom LaneDiscussion:https://postgr.es/m/16801-393c7922143eaa4d@postgresql.org1 parent2376361 commit80ca846
File tree
3 files changed
+109
-6
lines changed- src
- backend/parser
- test/regress
- expected
- sql
3 files changed
+109
-6
lines changedLines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
730 | 730 |
| |
731 | 731 |
| |
732 | 732 |
| |
733 |
| - | |
734 |
| - | |
735 | 733 |
| |
736 |
| - | |
737 | 734 |
| |
738 | 735 |
| |
739 | 736 |
| |
| 737 | + | |
740 | 738 |
| |
741 | 739 |
| |
| 740 | + | |
| 741 | + | |
742 | 742 |
| |
743 | 743 |
| |
744 | 744 |
| |
| |||
1006 | 1006 |
| |
1007 | 1007 |
| |
1008 | 1008 |
| |
1009 |
| - | |
1010 |
| - | |
1011 | 1009 |
| |
1012 |
| - | |
1013 | 1010 |
| |
1014 | 1011 |
| |
1015 | 1012 |
| |
| 1013 | + | |
1016 | 1014 |
| |
1017 | 1015 |
| |
| 1016 | + | |
| 1017 | + | |
1018 | 1018 |
| |
1019 | 1019 |
| |
1020 | 1020 |
| |
|
Lines changed: 59 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
176 | 176 |
| |
177 | 177 |
| |
178 | 178 |
| |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
179 | 238 |
| |
180 | 239 |
| |
181 | 240 |
| |
|
Lines changed: 44 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
95 | 95 |
| |
96 | 96 |
| |
97 | 97 |
| |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
98 | 142 |
| |
99 | 143 |
| |
100 | 144 |
| |
|
0 commit comments
Comments
(0)