|
22 | 22 | // Exception handling happens in two phases: a search phase and a cleanup phase.
|
23 | 23 | //
|
24 | 24 | // In both phases the unwinder walks stack frames from top to bottom using information from
|
25 |
| -// the stack frame unwind sections of the current process's modules. |
| 25 | +// the stack frame unwind sections of the current process's modules ("module" here refers to |
| 26 | +// an OS module, i.e. an executable or a dynamic library). |
26 | 27 | //
|
27 | 28 | // For each stack frame, it invokes the associated "personality routine", whose address is also
|
28 | 29 | // stored in the unwind info section.
|
|
37 | 38 | //
|
38 | 39 | // ~~~ Frame unwind info registration ~~~
|
39 | 40 | // Each module has its' own frame unwind info section (usually ".eh_frame"), and unwinder needs
|
40 |
| -// to know about all of them in order for unwinding to be able to to cross module boundaries. |
| 41 | +// to know about all of them in order for unwinding to be able to cross module boundaries. |
41 | 42 | //
|
42 | 43 | // On some platforms, like Linux, this is achieved by dynamically enumerating currently loaded
|
43 | 44 | // modules via the dl_iterate_phdr() API and finding all .eh_frame sections.
|
44 | 45 | //
|
45 | 46 | // Others, like Windows, require modules to actively register their unwind info sections by calling
|
46 | 47 | // __register_frame_info() API at startup.
|
47 | 48 | // In the latter case it is essential that there is only one copy of the unwinder runtime
|
48 |
| -// in the process. This is usually achieved by linking to the dynamice version of the unwind |
| 49 | +// in the process. This is usually achieved by linking to the dynamic version of the unwind |
49 | 50 | // runtime.
|
50 | 51 | //
|
51 | 52 | // Currently Rust uses unwind runtime provided by libgcc.
|
@@ -200,7 +201,7 @@ fn rust_exception_class() -> _Unwind_Exception_Class {
|
200 | 201 |
|
201 | 202 | // We could implement our personality routine in pure Rust, however exception info decoding
|
202 | 203 | // is tedious. More importantly, personality routines have to handle various platform
|
203 |
| -// quirks, which are not fun to maintain. For this reason, we attampt to reuse personality |
| 204 | +// quirks, which are not fun to maintain. For this reason, we attempt to reuse personality |
204 | 205 | // routine of the C language: __gcc_personality_v0.
|
205 | 206 | //
|
206 | 207 | // Since C does not support exception catching, __gcc_personality_v0 simply always
|
|
0 commit comments