Commit 19a0946
authored
Debug: clarify safety around ActivationBacktrace::new. (#12191)
* Debug: clarify safety around ActivationBacktrace::new.
As per [this discussion], we decided that we would handle potential
frame-cursor invalidation unsafety (with a hypothetical future
frame-editing debugger API) by putting `unsafe` on that future
hypothetical API rather than on the cursor construction. With the APIs
available today on the `Store`, there is no way to invalidate the frame
cursor while within its lifetime-bounded scope (with lifetime tied to
the `Store` that is passed into the hostcall creating the cursor), so
the API today should be completely safe. This PR makes it so.
[this discussion]: #12176 (comment)
* store_mut is safe as well.1 parent c9a764e commit 19a0946
File tree
2 files changed
+10
-44
lines changed- crates/wasmtime/src/runtime
- vm/traphandlers
2 files changed
+10
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 156 | + | |
162 | 157 | | |
163 | 158 | | |
164 | 159 | | |
| |||
203 | 198 | | |
204 | 199 | | |
205 | 200 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
| 201 | + | |
214 | 202 | | |
215 | 203 | | |
216 | 204 | | |
| |||
505 | 493 | | |
506 | 494 | | |
507 | 495 | | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
| 496 | + | |
512 | 497 | | |
513 | 498 | | |
514 | 499 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
| 410 | + | |
423 | 411 | | |
424 | 412 | | |
425 | 413 | | |
| |||
506 | 494 | | |
507 | 495 | | |
508 | 496 | | |
509 | | - | |
| 497 | + | |
510 | 498 | | |
511 | | - | |
| 499 | + | |
512 | 500 | | |
513 | 501 | | |
514 | 502 | | |
| |||
526 | 514 | | |
527 | 515 | | |
528 | 516 | | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
| 517 | + | |
537 | 518 | | |
538 | 519 | | |
539 | 520 | | |
| |||
554 | 535 | | |
555 | 536 | | |
556 | 537 | | |
557 | | - | |
558 | | - | |
559 | | - | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
560 | 541 | | |
561 | 542 | | |
562 | 543 | | |
| |||
0 commit comments