forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitef29bb1
committed
Do stack-depth checking in all postmaster children.
We used to only initialize the stack base pointer when starting up a regularbackend, not in other processes. In particular, autovacuum workers can runarbitrary user code, and without stack-depth checking, infinite recursionin e.g an index expression will bring down the whole cluster.The comment about PL/Java using set_stack_base() is not yet true. As thecode stands, PL/java still modifies the stack_base_ptr variable directly.However, it's been discussed in the PL/Java mailing list that it should bechanged to use the function, because PL/Java is currently oblivious to theregister stack used on Itanium. There's another issues with PL/Java, namelythat the stack base pointer it sets is not really the base of the stack, itcould be something close to the bottom of the stack. That's a separate issuethat might need some further changes to this code, but that's a differentstory.Backpatch to all supported releases.1 parent63d8636 commitef29bb1
File tree
3 files changed
+76
-8
lines changed- src
- backend
- postmaster
- tcop
- include
3 files changed
+76
-8
lines changedLines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
970 | 970 |
| |
971 | 971 |
| |
972 | 972 |
| |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
973 | 978 |
| |
974 | 979 |
| |
975 | 980 |
| |
| |||
3990 | 3995 |
| |
3991 | 3996 |
| |
3992 | 3997 |
| |
| 3998 | + | |
| 3999 | + | |
| 4000 | + | |
| 4001 | + | |
| 4002 | + | |
3993 | 4003 |
| |
3994 | 4004 |
| |
3995 | 4005 |
| |
|
Lines changed: 53 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
114 | 114 |
| |
115 | 115 |
| |
116 | 116 |
| |
117 |
| - | |
118 |
| - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
119 | 121 |
| |
120 | 122 |
| |
121 | 123 |
| |
| |||
3002 | 3004 |
| |
3003 | 3005 |
| |
3004 | 3006 |
| |
| 3007 | + | |
| 3008 | + | |
| 3009 | + | |
| 3010 | + | |
| 3011 | + | |
| 3012 | + | |
| 3013 | + | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
| 3043 | + | |
| 3044 | + | |
| 3045 | + | |
| 3046 | + | |
| 3047 | + | |
| 3048 | + | |
| 3049 | + | |
| 3050 | + | |
| 3051 | + | |
| 3052 | + | |
| 3053 | + | |
3005 | 3054 |
| |
3006 | 3055 |
| |
3007 | 3056 |
| |
| |||
3017 | 3066 |
| |
3018 | 3067 |
| |
3019 | 3068 |
| |
3020 |
| - | |
| 3069 | + | |
3021 | 3070 |
| |
3022 | 3071 |
| |
3023 | 3072 |
| |
| |||
3459 | 3508 |
| |
3460 | 3509 |
| |
3461 | 3510 |
| |
3462 |
| - | |
3463 | 3511 |
| |
3464 | 3512 |
| |
3465 | 3513 |
| |
| |||
3486 | 3534 |
| |
3487 | 3535 |
| |
3488 | 3536 |
| |
3489 |
| - | |
3490 |
| - | |
3491 |
| - | |
3492 |
| - | |
| 3537 | + | |
3493 | 3538 |
| |
3494 | 3539 |
| |
3495 | 3540 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
235 | 235 |
| |
236 | 236 |
| |
237 | 237 |
| |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
238 | 251 |
| |
239 | 252 |
| |
240 | 253 |
| |
|
0 commit comments
Comments
(0)