Commit 11160fb
authored
fix: segmentation fault when registering multiple extensions (#2112)
This PR fixes a segmentation fault when using
frankenphp.RegisterExtension with more than one extension.
The issue was a type mismatch between Go and C: Go passes a slice of
pointers, but the C code was treating it as a contiguous array of
structs. This caused invalid memory access when iterating past the first
element.
I created a minimal reproduction repo here:
[https://github.com/y-l-g/frankenphp-extensions-segfault-repro](https://www.google.com/url?sa=E&q=https%3A%2F%2Fgithub.com%2Fy-l-g%2Ffrankenphp-extensions-segfault-repro)1 parent e0f01d1 commit 11160fb
3 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1262 | 1262 | | |
1263 | 1263 | | |
1264 | 1264 | | |
1265 | | - | |
| 1265 | + | |
1266 | 1266 | | |
1267 | 1267 | | |
1268 | 1268 | | |
| |||
1273 | 1273 | | |
1274 | 1274 | | |
1275 | 1275 | | |
1276 | | - | |
| 1276 | + | |
1277 | 1277 | | |
1278 | 1278 | | |
1279 | 1279 | | |
| |||
1284 | 1284 | | |
1285 | 1285 | | |
1286 | 1286 | | |
1287 | | - | |
| 1287 | + | |
1288 | 1288 | | |
1289 | 1289 | | |
1290 | 1290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
0 commit comments