Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
26c1f8fb
Commit
26c1f8fb
authored
Oct 02, 2020
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Terminate on noexcept function trying to propagate exception (i386).
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cce4f36e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
cppexcept.h
dlls/msvcrt/cppexcept.h
+1
-0
except_i386.c
dlls/msvcrt/except_i386.c
+18
-1
No files found.
dlls/msvcrt/cppexcept.h
View file @
26c1f8fb
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#define CXX_EXCEPTION 0xe06d7363
#define CXX_EXCEPTION 0xe06d7363
#define FUNC_DESCR_SYNCHRONOUS 1
/* synchronous exceptions only (built with /EHs and /EHsc) */
#define FUNC_DESCR_SYNCHRONOUS 1
/* synchronous exceptions only (built with /EHs and /EHsc) */
#define FUNC_DESCR_NOEXCEPT 4
/* noexcept function */
typedef
void
(
*
vtable_ptr
)(
void
);
typedef
void
(
*
vtable_ptr
)(
void
);
...
...
dlls/msvcrt/except_i386.c
View file @
26c1f8fb
...
@@ -551,6 +551,18 @@ static LONG CALLBACK se_translation_filter( EXCEPTION_POINTERS *ep, void *c )
...
@@ -551,6 +551,18 @@ static LONG CALLBACK se_translation_filter( EXCEPTION_POINTERS *ep, void *c )
return
ExceptionContinueSearch
;
return
ExceptionContinueSearch
;
}
}
static
void
check_noexcept
(
PEXCEPTION_RECORD
rec
,
const
cxx_function_descr
*
descr
,
BOOL
nested
)
{
if
(
!
nested
&&
rec
->
ExceptionCode
==
CXX_EXCEPTION
&&
descr
->
magic
>=
CXX_FRAME_MAGIC_VC8
&&
(
descr
->
flags
&
FUNC_DESCR_NOEXCEPT
))
{
ERR
(
"noexcept function propagating exception
\n
"
);
MSVCRT_terminate
();
}
}
/*********************************************************************
/*********************************************************************
* cxx_frame_handler
* cxx_frame_handler
*
*
...
@@ -578,7 +590,11 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame
...
@@ -578,7 +590,11 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame
if
(
descr
->
unwind_count
&&
!
nested_frame
)
cxx_local_unwind
(
frame
,
descr
,
-
1
);
if
(
descr
->
unwind_count
&&
!
nested_frame
)
cxx_local_unwind
(
frame
,
descr
,
-
1
);
return
ExceptionContinueSearch
;
return
ExceptionContinueSearch
;
}
}
if
(
!
descr
->
tryblock_count
)
return
ExceptionContinueSearch
;
if
(
!
descr
->
tryblock_count
)
{
check_noexcept
(
rec
,
descr
,
nested_frame
!=
NULL
);
return
ExceptionContinueSearch
;
}
if
(
rec
->
ExceptionCode
==
CXX_EXCEPTION
&&
if
(
rec
->
ExceptionCode
==
CXX_EXCEPTION
&&
rec
->
ExceptionInformation
[
1
]
==
0
&&
rec
->
ExceptionInformation
[
2
]
==
0
)
rec
->
ExceptionInformation
[
1
]
==
0
&&
rec
->
ExceptionInformation
[
2
]
==
0
)
...
@@ -643,6 +659,7 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame
...
@@ -643,6 +659,7 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame
call_catch_block
(
rec
,
context
,
frame
,
descr
,
call_catch_block
(
rec
,
context
,
frame
,
descr
,
nested_frame
,
exc_type
);
nested_frame
,
exc_type
);
check_noexcept
(
rec
,
descr
,
nested_frame
!=
NULL
);
return
ExceptionContinueSearch
;
return
ExceptionContinueSearch
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment