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
1b46c066
Commit
1b46c066
authored
Mar 02, 2010
by
Reece Dunn
Committed by
Alexandre Julliard
Mar 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add a test case for calling TlsFree on a freed index.
parent
11abad24
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
process.c
dlls/kernel32/process.c
+1
-1
thread.c
dlls/kernel32/tests/thread.c
+11
-1
No files found.
dlls/kernel32/process.c
View file @
1b46c066
...
...
@@ -2496,7 +2496,7 @@ BOOL WINAPI TlsFree( DWORD index )
if
(
ret
)
NtSetInformationThread
(
GetCurrentThread
(),
ThreadZeroTlsCell
,
&
index
,
sizeof
(
index
)
);
else
SetLastError
(
ERROR_INVALID_PARAMETER
);
RtlReleasePebLock
();
return
TRUE
;
return
ret
;
}
...
...
dlls/kernel32/tests/thread.c
View file @
1b46c066
...
...
@@ -421,7 +421,17 @@ static VOID test_CreateThread_basic(void)
"Thread did not execute successfully
\n
"
);
ok
(
CloseHandle
(
thread
[
i
])
!=
0
,
"CloseHandle failed
\n
"
);
}
ok
(
TlsFree
(
tlsIndex
)
!=
0
,
"TlsFree failed
\n
"
);
SetLastError
(
0xCAFEF00D
);
ok
(
TlsFree
(
tlsIndex
)
!=
0
,
"TlsFree failed: %08x
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
0xCAFEF00D
,
"GetLastError: expected 0xCAFEF00D, got %08x
\n
"
,
GetLastError
());
/* Test freeing an already freed TLS index */
SetLastError
(
0xCAFEF00D
);
ok
(
TlsFree
(
tlsIndex
)
==
0
,
"TlsFree succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"GetLastError: expected ERROR_INVALID_PARAMETER, got %08x
\n
"
,
GetLastError
());
/* Test how passing NULL as a pointer to threadid works */
SetLastError
(
0xFACEaBAD
);
...
...
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