Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2017-01-25 04:45:59 +0300
committerJan Kotas <jkotas@microsoft.com>2017-01-25 04:45:59 +0300
commit9271b7edd05f4f10dd25d8ab7a8402cd1e4a89cd (patch)
tree477972b5437e60dd5979a9a22cf02ddefd0f1ed1 /src/Native/Runtime/i386
parent30fc995b02807f7863cd6dde5d4944dc7ce7d0f2 (diff)
Change stackwalking to always use unadjusted IP
Handling of hardware exceptions had a hack to add +1 to the actual instruction IP. Windows x64 unwinder is disassembling instructions at the IP passed in to detect method epilogs. If the bytes at IP + 1 happened to match the epilog pattern, the unwind is done as if we were in the middle of the epilog that lead to spectacular crash. This change is moving this adjustment to be done later for EH related things only, and not interfere with stackwalking. Fixes #2535 [tfs-changeset: 1645602]
Diffstat (limited to 'src/Native/Runtime/i386')
-rw-r--r--src/Native/Runtime/i386/ExceptionHandling.asm9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/Native/Runtime/i386/ExceptionHandling.asm b/src/Native/Runtime/i386/ExceptionHandling.asm
index 0d0fd7d04..d96ed44b8 100644
--- a/src/Native/Runtime/i386/ExceptionHandling.asm
+++ b/src/Native/Runtime/i386/ExceptionHandling.asm
@@ -29,15 +29,6 @@ FASTCALL_FUNC RhpThrowHwEx, 0
esp_offsetof_ExInfo textequ %0
esp_offsetof_Context textequ %SIZEOF__ExInfo
-
- add edx, 1 ;; 'faulting IP' += 1, we do this because everywhere else we treat the faulting IP as
- ;; a return-address and optionally subtract one when doing EH-related things (but not
- ;; subtracting 1 when doing GC-related things). The fault IP here will be the start
- ;; of the faulting instruction, so +1 will point to either the next instruction or the
- ;; middle of this instruction. Either way, when the dispatch / stackwalk code deals
- ;; with this address it'll apply a -1 for EH range checks and the GC-related operations
- ;; don't need to be precise here because the fault location isn't a GC safe point
-
push edx ; make it look like we were called by pushing the faulting IP like a return address
push ebp
mov ebp, esp