Commit ff25110
authored
Return stack frames of crashed thread when using wasm-c-api (#2908)
When using the wasm-c-api and there's a trap, `wasm_func_call()` returns
a `wasm_trap_t *` object. No matter which thread crashes, the trap contains
the stack frames of the main thread.
With this PR, when there's an exception, the stack frames of the thread
where the exception occurs are stored into the thread cluster.
`wasm_func_call()` can then return those stack frames.1 parent b21f17d commit ff25110
File tree
4 files changed
+73
-8
lines changed- core/iwasm
- common
- libraries/thread-mgr
4 files changed
+73
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1921 | 1921 | | |
1922 | 1922 | | |
1923 | 1923 | | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
1924 | 1940 | | |
1925 | 1941 | | |
1926 | 1942 | | |
1927 | | - | |
| 1943 | + | |
1928 | 1944 | | |
1929 | 1945 | | |
1930 | 1946 | | |
| |||
1954 | 1970 | | |
1955 | 1971 | | |
1956 | 1972 | | |
1957 | | - | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
1958 | 1976 | | |
1959 | 1977 | | |
1960 | 1978 | | |
| |||
2065 | 2083 | | |
2066 | 2084 | | |
2067 | 2085 | | |
2068 | | - | |
2069 | | - | |
2070 | | - | |
2071 | | - | |
| 2086 | + | |
2072 | 2087 | | |
2073 | 2088 | | |
2074 | 2089 | | |
| |||
3252 | 3267 | | |
3253 | 3268 | | |
3254 | 3269 | | |
| 3270 | + | |
3255 | 3271 | | |
3256 | 3272 | | |
3257 | 3273 | | |
| |||
3364 | 3380 | | |
3365 | 3381 | | |
3366 | 3382 | | |
3367 | | - | |
| 3383 | + | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
| 3388 | + | |
| 3389 | + | |
3368 | 3390 | | |
3369 | | - | |
| 3391 | + | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
| 3396 | + | |
3370 | 3397 | | |
3371 | 3398 | | |
3372 | 3399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
243 | 246 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
370 | 371 | | |
371 | 372 | | |
372 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
373 | 378 | | |
374 | 379 | | |
375 | 380 | | |
| |||
1321 | 1326 | | |
1322 | 1327 | | |
1323 | 1328 | | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
1324 | 1352 | | |
1325 | 1353 | | |
1326 | 1354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
54 | 61 | | |
55 | 62 | | |
56 | 63 | | |
| |||
0 commit comments