Commit 1788096
committed
Fix crash on J9/Zing: add NULL checks before freeing buffers
Initialize check before freeing _calltrace_buffer and _remote_frame_pool
to prevent crashes on first start when pointers contain uninitialized values.
Also move remote frame pool allocation outside conditional block to ensure
it's reset on every profiler start for clean state.1 parent 3b409aa commit 1788096
File tree
2 files changed
+15
-8
lines changed- .claude
- ddprof-lib/src/main/cpp
2 files changed
+15
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1302 | 1302 | | |
1303 | 1303 | | |
1304 | 1304 | | |
1305 | | - | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
1306 | 1308 | | |
1307 | 1309 | | |
1308 | 1310 | | |
1309 | 1311 | | |
1310 | 1312 | | |
1311 | 1313 | | |
| 1314 | + | |
| 1315 | + | |
1312 | 1316 | | |
1313 | | - | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
1314 | 1320 | | |
1315 | | - | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
1320 | 1321 | | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
1321 | 1327 | | |
1322 | 1328 | | |
1323 | 1329 | | |
| |||
0 commit comments