- Notifications
You must be signed in to change notification settings - Fork5
Commitef3883d
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 parent7feeced commitef3883d
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 |
| |
| |||
3977 | 3982 |
| |
3978 | 3983 |
| |
3979 | 3984 |
| |
| 3985 | + | |
| 3986 | + | |
| 3987 | + | |
| 3988 | + | |
| 3989 | + | |
3980 | 3990 |
| |
3981 | 3991 |
| |
3982 | 3992 |
| |
|
Lines changed: 53 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
118 |
| - | |
119 |
| - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
120 | 122 |
| |
121 | 123 |
| |
122 | 124 |
| |
| |||
2957 | 2959 |
| |
2958 | 2960 |
| |
2959 | 2961 |
| |
| 2962 | + | |
| 2963 | + | |
| 2964 | + | |
| 2965 | + | |
| 2966 | + | |
| 2967 | + | |
| 2968 | + | |
| 2969 | + | |
| 2970 | + | |
| 2971 | + | |
| 2972 | + | |
| 2973 | + | |
| 2974 | + | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
| 2988 | + | |
| 2989 | + | |
| 2990 | + | |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
| 2999 | + | |
| 3000 | + | |
| 3001 | + | |
| 3002 | + | |
| 3003 | + | |
| 3004 | + | |
| 3005 | + | |
| 3006 | + | |
| 3007 | + | |
| 3008 | + | |
2960 | 3009 |
| |
2961 | 3010 |
| |
2962 | 3011 |
| |
| |||
2972 | 3021 |
| |
2973 | 3022 |
| |
2974 | 3023 |
| |
2975 |
| - | |
| 3024 | + | |
2976 | 3025 |
| |
2977 | 3026 |
| |
2978 | 3027 |
| |
| |||
3434 | 3483 |
| |
3435 | 3484 |
| |
3436 | 3485 |
| |
3437 |
| - | |
3438 | 3486 |
| |
3439 | 3487 |
| |
3440 | 3488 |
| |
| |||
3461 | 3509 |
| |
3462 | 3510 |
| |
3463 | 3511 |
| |
3464 |
| - | |
3465 |
| - | |
3466 |
| - | |
3467 |
| - | |
| 3512 | + | |
3468 | 3513 |
| |
3469 | 3514 |
| |
3470 | 3515 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
246 | 246 |
| |
247 | 247 |
| |
248 | 248 |
| |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
249 | 262 |
| |
250 | 263 |
| |
251 | 264 |
| |
|
0 commit comments
Comments
(0)