Commit 14e802d
sqlite: invalidate sessions when closing database
DatabaseSync::DeleteSessions() deleted native sqlite3_session handles
without clearing the pointers held by their Session wrappers. Reopening
the database allowed stale session handles to be used, crashing the
process.
Track Session wrappers and delete sessions through Session::Delete() so
the wrappers are marked closed.
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
PR-URL: #64783
Fixes: #64782
Reviewed-By: Aviv Keller <me@aviv.sh>1 parent 31522c4 commit 14e802d
3 files changed
Lines changed: 37 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
915 | | - | |
916 | | - | |
| 915 | + | |
| 916 | + | |
917 | 917 | | |
918 | | - | |
919 | 918 | | |
920 | 919 | | |
921 | 920 | | |
| |||
2118 | 2117 | | |
2119 | 2118 | | |
2120 | 2119 | | |
2121 | | - | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
2122 | 2126 | | |
2123 | 2127 | | |
2124 | 2128 | | |
2125 | 2129 | | |
2126 | 2130 | | |
2127 | 2131 | | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
2128 | 2136 | | |
2129 | 2137 | | |
2130 | 2138 | | |
| |||
3813 | 3821 | | |
3814 | 3822 | | |
3815 | 3823 | | |
| 3824 | + | |
3816 | 3825 | | |
3817 | 3826 | | |
3818 | 3827 | | |
| |||
3905 | 3914 | | |
3906 | 3915 | | |
3907 | 3916 | | |
3908 | | - | |
| 3917 | + | |
3909 | 3918 | | |
3910 | | - | |
3911 | 3919 | | |
| 3920 | + | |
| 3921 | + | |
| 3922 | + | |
3912 | 3923 | | |
3913 | 3924 | | |
3914 | 3925 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| |||
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
246 | | - | |
| 247 | + | |
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
| |||
360 | 361 | | |
361 | 362 | | |
362 | 363 | | |
| 364 | + | |
| 365 | + | |
363 | 366 | | |
364 | 367 | | |
365 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
84 | 100 | | |
85 | 101 | | |
86 | 102 | | |
| |||
0 commit comments