Displaying 9 results from an estimated 9 matches for "_try".
Did you mean:
__try
2020 Apr 16
2
[RFC] [Windows SEH][-EHa] Support Hardware Exception Handling
...semantic. There is NO need to precisely model HW exception control flow at instruction-level.
Your example about memcpy() is just a bug in current implementation. I will fix it so that it’s volatilized in some manner. We are not in Code Review stage yet. let’s focus on design.
There is one seh_try_begin() invoke at the beginning of _try and one seh_try_end() invoke at the end of _try. Their EH edge will point to _except handler. So
your example below will not happen. Compiler should not generate code like that.
Thanks,
--Ten
From: Eli Friedman <efriedma at quicinc.com>
Sent: Thur...
2020 Apr 16
2
[RFC] [Windows SEH][-EHa] Support Hardware Exception Handling
...impression that threw_exception() will not be called if optimizations are enabled? I don’t know if the -EHa Spec is clearly described in MSFT Webs. At least this proposal has described the rules for both C & C++ code.
The very first rule clearly said that “no exception can move in or out of _try region., i.e., no potential faulty instruction can be moved across _try boundary”. As such the dereference of statement return *(C*)0 must be kept in _try scope and the access-violation fault will be caught in _except handler where threw_exception() will be called.
I don’t see why Register alloc...
2020 Apr 15
2
[RFC] [Windows SEH][-EHa] Support Hardware Exception Handling
...3b934fb5e
It passes all MSVC SEH suite (excluding those with “Jumping out of _finally” ( _Local_Unwind)).
Thanks,
--Ten
**** The rules for C code: ****
For C-code, one way (MSVC approach) to achieve SEH -EHa semantic is to
follow three rules. First, no exception can move in or out of _try
region., i.e., no "potential faulty instruction can be moved across _try
boundary. Second, the order of exceptions for instructions 'directly'
under a _try must be preserved (not applied to those in callees).
Finally, global states (local/global/heap variables) that can...
2020 Apr 02
2
[RFC] [Windows SEH] Local_Unwind (Jumping out of a _finally) and -EHa (Hardware Exception Handling)
...e target code, not just "jump" to target label
I'm not sure what you're trying to say here. In the Microsoft ABI, goto out of a catch block also calls into the unwinder. We have to run any destructors, and return from the funclet (catchret/cleanupret).
* The call inside a _try is an invoke with EH edge. So it's perfectly modeled.
If you call a nounwind function, the invoke will be transformed to a plain call. And we're likely to infer nounwind in many cases (for example, functions that don't call any other functions). There isn't any way to stop this...
2020 Apr 02
2
[RFC] [Windows SEH] Local_Unwind (Jumping out of a _finally) and -EHa (Hardware Exception Handling)
...page as an example,
the control flowing from normal execution of inner _finlly, passing through outer _finally, and landing in $t10 cannot be represented by LLVM IR.
Or could you elaborate how to achieve it? (Bear with me as I'm new in Clang&LLVM world).
Take your example, replace "_try" with C++ "try", replace the "_finally" with "catch(....)" with a "throw;" at the end of the catch block, replace the "_except()" with "catch(...)", and see what clang currently generates. That seems roughly equivalent to what you...
2020 Apr 01
2
[RFC] [Windows SEH] Local_Unwind (Jumping out of a _finally) and -EHa (Hardware Exception Handling)
...<label>:45: ; preds = %43
%46 = catchpad within %44 [i8* bitcast (i32 (i8*, i8*)* @"?filt at 0@main@@" to i8*)],
catchret from %46 to label %47,
; <label>:47: ; preds = %45
// except handler block
..
br label %53, !dbg !155
; <label>:53: ; preds = %47, %34
// after outer _try block
.. br label %56, !dbg !156
; <label>:t10:
.. ..
define internal void @"?fin at 0@main@@"(i8, i8* %1) #2 {
..
%2 = blockaddress($main, $t10)
call void @"?local_unwind@@"(i8* %1, i8* %2)
________________________________
The new IR is illustrated below. Changes are high...
2020 Apr 01
2
[RFC] [Windows SEH] Local_Unwind (Jumping out of a _finally) and -EHa (Hardware Exception Handling)
Resending; I accidentally dropped llvm-dev.
-Eli
From: Eli Friedman
Sent: Wednesday, April 1, 2020 1:01 PM
To: Ten Tzen <tentzen at microsoft.com>
Cc: aaron.smith at microsoft.com
Subject: RE: [EXT] [llvm-dev] [RFC] [Windows SEH] Local_Unwind (Jumping out of a _finally) and -EHa (Hardware Exception Handling)
This looks like it outlines the implementation pretty well.
For goto in finally,
2013 Aug 21
2
PATCH for cpu.c
...ome time ago all project files for MSVC 6 were removed; it makes sense to remove the code that is necessary only for MSVC 6 and older compilers.
--- a\src\libFLAC\cpu.c 2013-08-13 13:30:24.000000000 +0400
+++ b\src\libFLAC\cpu.c 2013-08-16 21:46:42.177485300 +0400
@@ -285,14 +285,7 @@
# ifdef USE_TRY_CATCH_FLAVOR
_try {
__asm {
-# if _MSC_VER <= 1200
- /* VC6 assembler doesn't know SSE, have to emit bytecode instead */
- _emit 0x0F
- _emit 0x57
- _emit 0xC0
-# else
xorps xmm0,xmm0
-# endif
}
}
_except(EXCEPTION_EXECUTE_HANDLER) {
@@ -3...
2020 May 03
2
[RFC] [Windows SEH] Local_Unwind (Jumping out of a _finally)
...ously when it’s combined with -EHa.
Major code is surrounding at SehTryStmt and _Finally in CGexception.cpp that is the place to house Windows SEH specific code anyways.
The implementation chose to lever Parser/Semantic phase (SemaStmt.cpp, JumpDiagnostics.cpp, scope.h, etc) to identify the right _Try scope for LU dispatching because that is the place “warn_jump_out_of_seh_finally” is diagnosed and reported. I feel this is the most robust approach.
Local_unwind is an important feature, broadly used in Windows Kernel for all architectures.
Without LU, Windows SEH is incomplete!
Thanks,
--Ten...