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
e2c081a8
Commit
e2c081a8
authored
Nov 18, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Dec 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Trace the name of critical sections which are released while not acquired.
parent
c2bff6b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
sync.c
dlls/ntdll/sync.c
+10
-4
No files found.
dlls/ntdll/sync.c
View file @
e2c081a8
...
@@ -155,6 +155,13 @@ static BOOL crit_section_has_debuginfo( const RTL_CRITICAL_SECTION *crit )
...
@@ -155,6 +155,13 @@ static BOOL crit_section_has_debuginfo( const RTL_CRITICAL_SECTION *crit )
return
crit
->
DebugInfo
!=
NULL
&&
crit
->
DebugInfo
!=
no_debug_info_marker
;
return
crit
->
DebugInfo
!=
NULL
&&
crit
->
DebugInfo
!=
no_debug_info_marker
;
}
}
static
const
char
*
crit_section_get_name
(
const
RTL_CRITICAL_SECTION
*
crit
)
{
if
(
crit_section_has_debuginfo
(
crit
))
return
(
char
*
)
crit
->
DebugInfo
->
Spare
[
0
];
return
"?"
;
}
static
inline
HANDLE
get_semaphore
(
RTL_CRITICAL_SECTION
*
crit
)
static
inline
HANDLE
get_semaphore
(
RTL_CRITICAL_SECTION
*
crit
)
{
{
HANDLE
ret
=
crit
->
LockSemaphore
;
HANDLE
ret
=
crit
->
LockSemaphore
;
...
@@ -311,9 +318,8 @@ NTSTATUS WINAPI RtlpWaitForCriticalSection( RTL_CRITICAL_SECTION *crit )
...
@@ -311,9 +318,8 @@ NTSTATUS WINAPI RtlpWaitForCriticalSection( RTL_CRITICAL_SECTION *crit )
if
(
status
==
STATUS_TIMEOUT
)
if
(
status
==
STATUS_TIMEOUT
)
{
{
const
char
*
name
=
NULL
;
const
char
*
name
=
crit_section_get_name
(
crit
);
if
(
crit_section_has_debuginfo
(
crit
))
name
=
(
char
*
)
crit
->
DebugInfo
->
Spare
[
0
];
if
(
!
name
)
name
=
"?"
;
ERR
(
"section %p %s wait timed out in thread %04lx, blocked by %04lx, retrying (60 sec)
\n
"
,
ERR
(
"section %p %s wait timed out in thread %04lx, blocked by %04lx, retrying (60 sec)
\n
"
,
crit
,
debugstr_a
(
name
),
GetCurrentThreadId
(),
HandleToULong
(
crit
->
OwningThread
)
);
crit
,
debugstr_a
(
name
),
GetCurrentThreadId
(),
HandleToULong
(
crit
->
OwningThread
)
);
status
=
wait_semaphore
(
crit
,
60
);
status
=
wait_semaphore
(
crit
,
60
);
...
@@ -461,7 +467,7 @@ NTSTATUS WINAPI RtlLeaveCriticalSection( RTL_CRITICAL_SECTION *crit )
...
@@ -461,7 +467,7 @@ NTSTATUS WINAPI RtlLeaveCriticalSection( RTL_CRITICAL_SECTION *crit )
if
(
--
crit
->
RecursionCount
)
if
(
--
crit
->
RecursionCount
)
{
{
if
(
crit
->
RecursionCount
>
0
)
InterlockedDecrement
(
&
crit
->
LockCount
);
if
(
crit
->
RecursionCount
>
0
)
InterlockedDecrement
(
&
crit
->
LockCount
);
else
ERR
(
"section %p
is not acquired
\n
"
,
crit
);
else
ERR
(
"section %p
%s is not acquired
\n
"
,
crit
,
debugstr_a
(
crit_section_get_name
(
crit
))
);
}
}
else
else
{
{
...
...
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