forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit77dc2b0
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 parentf42a4c0 commit77dc2b0
File tree
3 files changed
+76
-8
lines changed- src
- backend
- postmaster
- tcop
- include
3 files changed
+76
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
949 | 954 | | |
950 | 955 | | |
951 | 956 | | |
| |||
3944 | 3949 | | |
3945 | 3950 | | |
3946 | 3951 | | |
| 3952 | + | |
| 3953 | + | |
| 3954 | + | |
| 3955 | + | |
| 3956 | + | |
3947 | 3957 | | |
3948 | 3958 | | |
3949 | 3959 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
3024 | 3026 | | |
3025 | 3027 | | |
3026 | 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 | + | |
| 3054 | + | |
| 3055 | + | |
| 3056 | + | |
| 3057 | + | |
| 3058 | + | |
| 3059 | + | |
| 3060 | + | |
| 3061 | + | |
| 3062 | + | |
| 3063 | + | |
| 3064 | + | |
| 3065 | + | |
| 3066 | + | |
| 3067 | + | |
| 3068 | + | |
| 3069 | + | |
| 3070 | + | |
| 3071 | + | |
| 3072 | + | |
| 3073 | + | |
| 3074 | + | |
| 3075 | + | |
3027 | 3076 | | |
3028 | 3077 | | |
3029 | 3078 | | |
| |||
3039 | 3088 | | |
3040 | 3089 | | |
3041 | 3090 | | |
3042 | | - | |
| 3091 | + | |
3043 | 3092 | | |
3044 | 3093 | | |
3045 | 3094 | | |
| |||
3469 | 3518 | | |
3470 | 3519 | | |
3471 | 3520 | | |
3472 | | - | |
3473 | 3521 | | |
3474 | 3522 | | |
3475 | 3523 | | |
| |||
3496 | 3544 | | |
3497 | 3545 | | |
3498 | 3546 | | |
3499 | | - | |
3500 | | - | |
3501 | | - | |
3502 | | - | |
| 3547 | + | |
3503 | 3548 | | |
3504 | 3549 | | |
3505 | 3550 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
237 | 250 | | |
238 | 251 | | |
239 | 252 | | |
| |||
0 commit comments
Comments
(0)