ReactOS
0.4.16-dev-1025-gd3456f5
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
seh0024.c
Go to the documentation of this file.
1
// Copyright (c) Microsoft. All rights reserved.
2
// Licensed under the MIT license. See LICENSE file in the project root for
3
// full license information.
4
5
#include <windows.h>
6
7
#if defined(_M_MRX000) || defined(_M_PPC) || defined(_ALPHA)
8
#include <
setjmpex.h
>
9
#else
10
#include <setjmp.h>
11
#endif
12
13
#define faill()
14
#define startest()
15
#define finish()
16
17
#include "
seh.h
"
18
19
char
test
[] =
"SEH0024.c"
;
20
21
int
main
() {
22
jmp_buf
JumpBuffer;
23
LONG
Counter
;
24
25
Counter
= 0;
26
27
#if defined(_M_MRX000) || defined(_M_PPC) || defined(_ALPHA)
28
if
(
setjmp
(JumpBuffer) == 0)
29
#else
30
if
(_setjmp(JumpBuffer) == 0)
31
#endif
32
33
{
34
try
{
35
try
{
36
try
{
37
try
{
38
/* set counter = 1 */
39
//(volatile LONG) Counter += 1;
40
*(
volatile
LONG
*)&
Counter
+= 1;
41
RaiseException
(
EXCEPTION_INT_OVERFLOW
, 0,
/*no flags*/
0, 0);
42
}
43
finally
{
44
/* set counter = 2 */
45
//(volatile LONG) Counter += 1;
46
*(
volatile
LONG
*)&
Counter
+= 1;
47
}
48
endtry
49
}
50
finally
{
51
/* set counter = 3 */
52
//(volatile LONG) Counter += 1;
53
*(
volatile
LONG
*)&
Counter
+= 1;
54
/* end unwinding wiht long jump */
55
longjmp(JumpBuffer, 1);
56
}
57
endtry
58
}
59
finally
{
60
/* never gets here due to longjump ending unwinding */
61
//(volatile LONG) Counter += 1;
62
*(
volatile
LONG
*)&
Counter
+= 1;
63
}
64
endtry
65
}
66
except
(1)
67
/* handle exception after unwinding */
68
{
69
/* sets counter = 4 */
70
//(volatile LONG) Counter += 1;
71
*(
volatile
LONG
*)&
Counter
+= 1;
72
}
73
endtry
74
}
else
{
75
/* sets counter = 5 */
76
//(volatile LONG) Counter += 1;
77
*(
volatile
LONG
*)&
Counter
+= 1;
78
}
79
80
if
(
Counter
!= 5) {
81
printf
(
"TEST 24 FAILED. Counter = %d\n\r"
,
Counter
);
82
return
-1;
83
}
84
85
return
0;
86
}
except
#define except(x)
Definition:
btrfs_drv.h:136
RaiseException
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
Definition:
except.c:700
printf
#define printf
Definition:
freeldr.h:97
LONG
long LONG
Definition:
pedump.c:60
test
char test[]
Definition:
seh0024.c:19
main
int main()
Definition:
seh0024.c:21
seh.h
endtry
#define endtry
Definition:
seh.h:24
setjmpex.h
Counter
static LARGE_INTEGER Counter
Definition:
clock.c:43
setjmp
#define setjmp
Definition:
setjmp.h:209
jmp_buf
_JBTYPE jmp_buf[_JBLEN]
Definition:
setjmp.h:186
EXCEPTION_INT_OVERFLOW
#define EXCEPTION_INT_OVERFLOW
Definition:
winbase.h:350
modules
rostests
apitests
compiler
ms
seh
seh0024.c
Generated on Tue Apr 22 2025 06:07:40 for ReactOS by
1.9.6