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
8b3944e1
Commit
8b3944e1
authored
Mar 07, 2024
by
Paul Gofman
Committed by
Alexandre Julliard
Mar 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Only allocate debug info in critical sections with…
ntdll: Only allocate debug info in critical sections with RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO.
parent
9115dc0a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
sync.c
dlls/kernel32/tests/sync.c
+4
-4
sync.c
dlls/ntdll/sync.c
+6
-2
rtl.c
dlls/ntdll/tests/rtl.c
+1
-1
No files found.
dlls/kernel32/tests/sync.c
View file @
8b3944e1
...
...
@@ -2741,7 +2741,7 @@ static void test_crit_section(void)
to override that. */
memset
(
&
cs
,
0
,
sizeof
(
cs
));
InitializeCriticalSection
(
&
cs
);
todo_wine
ok
(
cs
.
DebugInfo
==
(
void
*
)(
ULONG_PTR
)
-
1
||
broken
(
!!
cs
.
DebugInfo
)
/* before Win8 */
,
ok
(
cs
.
DebugInfo
==
(
void
*
)(
ULONG_PTR
)
-
1
||
broken
(
!!
cs
.
DebugInfo
)
/* before Win8 */
,
"Unexpected debug info pointer %p.
\n
"
,
cs
.
DebugInfo
);
DeleteCriticalSection
(
&
cs
);
ok
(
cs
.
DebugInfo
==
NULL
,
"Unexpected debug info pointer %p.
\n
"
,
cs
.
DebugInfo
);
...
...
@@ -2755,7 +2755,7 @@ static void test_crit_section(void)
memset
(
&
cs
,
0
,
sizeof
(
cs
));
ret
=
pInitializeCriticalSectionEx
(
&
cs
,
0
,
0
);
ok
(
ret
,
"Failed to initialize critical section.
\n
"
);
todo_wine
ok
(
cs
.
DebugInfo
==
(
void
*
)(
ULONG_PTR
)
-
1
||
broken
(
!!
cs
.
DebugInfo
)
/* before Win8 */
,
ok
(
cs
.
DebugInfo
==
(
void
*
)(
ULONG_PTR
)
-
1
||
broken
(
!!
cs
.
DebugInfo
)
/* before Win8 */
,
"Unexpected debug info pointer %p.
\n
"
,
cs
.
DebugInfo
);
DeleteCriticalSection
(
&
cs
);
ok
(
cs
.
DebugInfo
==
NULL
,
"Unexpected debug info pointer %p.
\n
"
,
cs
.
DebugInfo
);
...
...
@@ -2765,12 +2765,12 @@ static void test_crit_section(void)
ok
(
ret
,
"Failed to initialize critical section.
\n
"
);
ok
(
cs
.
DebugInfo
==
(
void
*
)(
ULONG_PTR
)
-
1
,
"Unexpected debug info pointer %p.
\n
"
,
cs
.
DebugInfo
);
DeleteCriticalSection
(
&
cs
);
todo_wine
ok
(
cs
.
DebugInfo
==
NULL
,
"Unexpected debug info pointer %p.
\n
"
,
cs
.
DebugInfo
);
ok
(
cs
.
DebugInfo
==
NULL
,
"Unexpected debug info pointer %p.
\n
"
,
cs
.
DebugInfo
);
memset
(
&
cs
,
0
,
sizeof
(
cs
));
ret
=
pInitializeCriticalSectionEx
(
&
cs
,
0
,
0
);
ok
(
ret
,
"Failed to initialize critical section.
\n
"
);
todo_wine
ok
(
cs
.
DebugInfo
==
(
void
*
)(
ULONG_PTR
)
-
1
||
broken
(
!!
cs
.
DebugInfo
)
/* before Win8 */
,
ok
(
cs
.
DebugInfo
==
(
void
*
)(
ULONG_PTR
)
-
1
||
broken
(
!!
cs
.
DebugInfo
)
/* before Win8 */
,
"Unexpected debug info pointer %p.
\n
"
,
cs
.
DebugInfo
);
DeleteCriticalSection
(
&
cs
);
ok
(
cs
.
DebugInfo
==
NULL
,
"Unexpected debug info pointer %p.
\n
"
,
cs
.
DebugInfo
);
...
...
dlls/ntdll/sync.c
View file @
8b3944e1
...
...
@@ -232,7 +232,7 @@ NTSTATUS WINAPI RtlInitializeCriticalSectionEx( RTL_CRITICAL_SECTION *crit, ULON
* is done, then debug info should be managed through Rtlp[Allocate|Free]DebugInfo
* so (e.g.) MakeCriticalSectionGlobal() doesn't free it using HeapFree().
*/
if
(
flags
&
RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO
)
if
(
!
(
flags
&
RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO
)
)
crit
->
DebugInfo
=
no_debug_info_marker
;
else
{
...
...
@@ -288,7 +288,11 @@ NTSTATUS WINAPI RtlDeleteCriticalSection( RTL_CRITICAL_SECTION *crit )
crit
->
DebugInfo
=
NULL
;
}
}
else
NtClose
(
crit
->
LockSemaphore
);
else
{
NtClose
(
crit
->
LockSemaphore
);
crit
->
DebugInfo
=
NULL
;
}
crit
->
LockSemaphore
=
0
;
return
STATUS_SUCCESS
;
}
...
...
dlls/ntdll/tests/rtl.c
View file @
8b3944e1
...
...
@@ -2973,7 +2973,7 @@ static void test_RtlInitializeCriticalSectionEx(void)
memset
(
&
cs
,
0x11
,
sizeof
(
cs
));
pRtlInitializeCriticalSectionEx
(
&
cs
,
0
,
0
);
ok
(
(
cs
.
DebugInfo
!=
NULL
&&
cs
.
DebugInfo
!=
no_debug
)
||
broken
(
cs
.
DebugInfo
==
no_debug
)
/* >= Win
8 */
,
ok
(
cs
.
DebugInfo
==
no_debug
||
broken
(
cs
.
DebugInfo
!=
NULL
&&
cs
.
DebugInfo
!=
no_debug
)
/* < Win
8 */
,
"expected DebugInfo != NULL and DebugInfo != ~0, got %p
\n
"
,
cs
.
DebugInfo
);
ok
(
cs
.
LockCount
==
-
1
,
"expected LockCount == -1, got %ld
\n
"
,
cs
.
LockCount
);
ok
(
cs
.
RecursionCount
==
0
,
"expected RecursionCount == 0, got %ld
\n
"
,
cs
.
RecursionCount
);
...
...
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