Commit d28345f
fix(core): Guard clearSession with session lock to prevent NPE (#5657)
* fix(core): Guard clearSession with session lock to prevent NPE
clearSession() reset the session field without acquiring sessionLock,
unlike the other session mutators (startSession, endSession,
withSession). This allowed it to null out the session between a
null-check and a dereference (e.g. session.clone()) in those locked
methods, leading to a NullPointerException. Acquire sessionLock so all
session mutations are mutually exclusive.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* changelog
* changelog
* changelog
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent d8b6ce1 commit d28345f
2 files changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1147 | 1147 | | |
1148 | 1148 | | |
1149 | 1149 | | |
1150 | | - | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
1151 | 1153 | | |
1152 | 1154 | | |
1153 | 1155 | | |
| |||
0 commit comments