Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
6202cf45
Commit
6202cf45
authored
Mar 26, 2019
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Mar 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wer: Fix WER_REPORT_TYPE failures on recent win10.
Signed-off-by:
Detlef Riekenberg
<
wine.dev@web.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9f4d05b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
main.c
dlls/wer/main.c
+1
-1
main.c
dlls/wer/tests/main.c
+22
-4
No files found.
dlls/wer/main.c
View file @
6202cf45
...
@@ -278,7 +278,7 @@ HRESULT WINAPI WerReportCreate(PCWSTR eventtype, WER_REPORT_TYPE reporttype, PWE
...
@@ -278,7 +278,7 @@ HRESULT WINAPI WerReportCreate(PCWSTR eventtype, WER_REPORT_TYPE reporttype, PWE
}
}
if
(
phandle
)
*
phandle
=
NULL
;
if
(
phandle
)
*
phandle
=
NULL
;
if
(
!
eventtype
||
!
eventtype
[
0
]
||
!
phandle
)
{
if
(
!
eventtype
||
!
eventtype
[
0
]
||
!
phandle
||
(
reporttype
>=
WerReportInvalid
)
)
{
return
E_INVALIDARG
;
return
E_INVALIDARG
;
}
}
...
...
dlls/wer/tests/main.c
View file @
6202cf45
/*
/*
* Unit test suite for windows error reporting in Vista and above
* Unit test suite for windows error reporting in Vista and above
*
*
* Copyright 2010 Detlef Riekenberg
* Copyright 2010
,2019
Detlef Riekenberg
*
*
* This library is free software; you can redistribute it and/or
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* modify it under the terms of the GNU Lesser General Public
...
@@ -207,8 +207,8 @@ static void test_WerReportCreate(void)
...
@@ -207,8 +207,8 @@ static void test_WerReportCreate(void)
hr
=
WerReportCreate
(
empty
,
WerReportCritical
,
NULL
,
&
report
);
hr
=
WerReportCreate
(
empty
,
WerReportCritical
,
NULL
,
&
report
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%x and %p(expected E_INVALIDARG)
\n
"
,
hr
,
report
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%x and %p(expected E_INVALIDARG)
\n
"
,
hr
,
report
);
/*
WER_REPORT_TYPE is not checked during WerReportCreate
*/
/*
a valid WER_REPORT_TYPE works
*/
for
(
i
=
0
;
i
<
=
WerReportInvalid
+
1
;
i
++
)
{
for
(
i
=
0
;
i
<
WerReportInvalid
;
i
++
)
{
report
=
(
void
*
)
0xdeadbeef
;
report
=
(
void
*
)
0xdeadbeef
;
hr
=
WerReportCreate
(
appcrash
,
i
,
NULL
,
&
report
);
hr
=
WerReportCreate
(
appcrash
,
i
,
NULL
,
&
report
);
ok
(
hr
==
S_OK
,
"%d: got 0x%x and %p (expected S_OK)
\n
"
,
i
,
hr
,
report
);
ok
(
hr
==
S_OK
,
"%d: got 0x%x and %p (expected S_OK)
\n
"
,
i
,
hr
,
report
);
...
@@ -217,9 +217,27 @@ static void test_WerReportCreate(void)
...
@@ -217,9 +217,27 @@ static void test_WerReportCreate(void)
ok
(
hr
==
S_OK
,
"%d: got 0x%x for %p (expected S_OK)
\n
"
,
i
,
hr
,
report
);
ok
(
hr
==
S_OK
,
"%d: got 0x%x for %p (expected S_OK)
\n
"
,
i
,
hr
,
report
);
}
}
/* values for WER_REPORT_TYPE are checked and invalid values are rejected since recent win10,
but older windows versions did not check the report type and WerReportCreate always succeeded */
report
=
(
void
*
)
0xdeadbeef
;
hr
=
WerReportCreate
(
appcrash
,
WerReportInvalid
,
NULL
,
&
report
);
ok
((
hr
==
E_INVALIDARG
)
|
broken
(
hr
==
S_OK
),
"%d: got 0x%x and %p (expected E_INVALIDARG or a broken S_OK)
\n
"
,
i
,
hr
,
report
);
if
(
hr
==
S_OK
)
{
hr
=
WerReportCloseHandle
(
report
);
ok
(
hr
==
S_OK
,
"%d: got 0x%x for %p (expected S_OK)
\n
"
,
i
,
hr
,
report
);
}
report
=
(
void
*
)
0xdeadbeef
;
report
=
(
void
*
)
0xdeadbeef
;
hr
=
WerReportCreate
(
appcrash
,
42
,
NULL
,
&
report
);
hr
=
WerReportCreate
(
appcrash
,
42
,
NULL
,
&
report
);
ok
(
hr
==
S_OK
,
"42: got 0x%x and %p (expected S_OK)
\n
"
,
hr
,
report
);
ok
((
hr
==
E_INVALIDARG
)
|
broken
(
hr
==
S_OK
),
"%d: got 0x%x and %p (expected E_INVALIDARG or a broken S_OK)
\n
"
,
i
,
hr
,
report
);
if
(
hr
==
S_OK
)
{
hr
=
WerReportCloseHandle
(
report
);
ok
(
hr
==
S_OK
,
"%d: got 0x%x for %p (expected S_OK)
\n
"
,
i
,
hr
,
report
);
}
/* multiple active reports are possible */
/* multiple active reports are possible */
memset
(
table
,
0
,
sizeof
(
table
));
memset
(
table
,
0
,
sizeof
(
table
));
...
...
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