- Notifications
You must be signed in to change notification settings - Fork28
Commit49076fd
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 parent1f56ae3 commit49076fd
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 | |
---|---|---|---|
| |||
537 | 537 |
| |
538 | 538 |
| |
539 | 539 |
| |
540 |
| - | |
541 |
| - | |
542 | 540 |
| |
543 |
| - | |
544 | 541 |
| |
545 | 542 |
| |
546 | 543 |
| |
| 544 | + | |
547 | 545 |
| |
548 | 546 |
| |
| 547 | + | |
| 548 | + | |
549 | 549 |
| |
550 | 550 |
| |
551 | 551 |
| |
| |||
813 | 813 |
| |
814 | 814 |
| |
815 | 815 |
| |
816 |
| - | |
817 |
| - | |
818 | 816 |
| |
819 |
| - | |
820 | 817 |
| |
821 | 818 |
| |
822 | 819 |
| |
| 820 | + | |
823 | 821 |
| |
824 | 822 |
| |
| 823 | + | |
| 824 | + | |
825 | 825 |
| |
826 | 826 |
| |
827 | 827 |
| |
|
Lines changed: 59 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
167 | 167 |
| |
168 | 168 |
| |
169 | 169 |
| |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 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 | + | |
170 | 229 |
| |
171 | 230 |
| |
172 | 231 |
| |
|
Lines changed: 44 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
87 | 87 |
| |
88 | 88 |
| |
89 | 89 |
| |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 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 | + | |
90 | 134 |
| |
91 | 135 |
| |
92 | 136 |
| |
|
0 commit comments
Comments
(0)