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
905bf793
Commit
905bf793
authored
Jul 30, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Jul 30, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Store correct entry point for first thread.
parent
6e66c12c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
info.c
dlls/ntdll/tests/info.c
+10
-2
process.c
server/process.c
+1
-0
thread.c
server/thread.c
+1
-1
No files found.
dlls/ntdll/tests/info.c
View file @
905bf793
...
...
@@ -1713,18 +1713,26 @@ static DWORD WINAPI start_address_thread(void *arg)
static
void
test_thread_start_address
(
void
)
{
PRTL_THREAD_START_ROUTINE
entry
;
PRTL_THREAD_START_ROUTINE
entry
,
expected_entry
;
IMAGE_NT_HEADERS
*
nt
;
NTSTATUS
status
;
HANDLE
thread
;
void
*
module
;
DWORD
ret
;
module
=
GetModuleHandleA
(
0
);
ok
(
module
!=
NULL
,
"expected non-NULL address for module
\n
"
);
nt
=
RtlImageNtHeader
(
module
);
ok
(
nt
!=
NULL
,
"expected non-NULL address for NT header
\n
"
);
entry
=
NULL
;
ret
=
0xdeadbeef
;
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
ThreadQuerySetWin32StartAddress
,
&
entry
,
sizeof
(
entry
),
&
ret
);
ok
(
status
==
STATUS_SUCCESS
,
"expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
ok
(
ret
==
sizeof
(
entry
),
"NtQueryInformationThread returned %u bytes
\n
"
,
ret
);
ok
(
entry
!=
NULL
,
"expected non-NULL entry point
\n
"
);
expected_entry
=
(
void
*
)((
char
*
)
module
+
nt
->
OptionalHeader
.
AddressOfEntryPoint
);
ok
(
entry
==
expected_entry
,
"expected %p, got %p
\n
"
,
expected_entry
,
entry
);
entry
=
(
void
*
)
0xdeadbeef
;
status
=
pNtSetInformationThread
(
GetCurrentThread
(),
ThreadQuerySetWin32StartAddress
,
...
...
server/process.c
View file @
905bf793
...
...
@@ -1295,6 +1295,7 @@ DECL_HANDLER(init_process_done)
process
->
ldt_copy
=
req
->
ldt_copy
;
process
->
start_time
=
current_time
;
current
->
entry_point
=
req
->
entry
;
generate_startup_debug_events
(
process
,
req
->
entry
);
set_process_startup_state
(
process
,
STARTUP_DONE
);
...
...
server/thread.c
View file @
905bf793
...
...
@@ -1287,7 +1287,7 @@ DECL_HANDLER(init_thread)
current
->
unix_pid
=
req
->
unix_pid
;
current
->
unix_tid
=
req
->
unix_tid
;
current
->
teb
=
req
->
teb
;
current
->
entry_point
=
req
->
entry
;
current
->
entry_point
=
process
->
peb
?
req
->
entry
:
0
;
if
(
!
process
->
peb
)
/* first thread, initialize the process too */
{
...
...
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