Commit af610cd
fix(stacktrace): stop leaking internal frame state into event payload (#2962)
Interface#to_h serializes every instance variable, so helper ivars
stored on StacktraceInterface::Frame leaked into the event payload. The
FilenameCache change (#2904) made this worse by serializing
"#<Sentry::FilenameCache:0x...>" — a memory address that differs on
every run — into every frame.
Pass filename_cache/strip_backtrace_load_path through the constructor
instead of storing them as ivars, so they never reach to_h. This also
drops the pre-existing project_root/strip_backtrace_load_path leaks. All
real frame fields are unchanged.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent a1f02d6 commit af610cd
2 files changed
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
37 | 34 | | |
38 | 35 | | |
39 | | - | |
| 36 | + | |
40 | 37 | | |
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
44 | 41 | | |
45 | 42 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | 43 | | |
51 | 44 | | |
52 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
0 commit comments