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
c79cf02f
Commit
c79cf02f
authored
Jul 13, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Make sure to not unmap anything from reserved areas
when using NtFreeVirtualMemory with the MEM_SYSTEM flag.
parent
bb63a325
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
virtual.c
dlls/ntdll/virtual.c
+2
-1
kthread.c
loader/kthread.c
+2
-2
pthread.c
loader/pthread.c
+1
-1
No files found.
dlls/ntdll/virtual.c
View file @
c79cf02f
...
...
@@ -1386,7 +1386,8 @@ NTSTATUS WINAPI NtFreeVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T *si
{
/* return the values that the caller should use to unmap the area */
*
addr_ptr
=
view
->
base
;
*
size_ptr
=
view
->
size
;
if
(
!
wine_mmap_is_in_reserved_area
(
view
->
base
,
view
->
size
))
*
size_ptr
=
view
->
size
;
else
*
size_ptr
=
0
;
/* make sure we don't munmap anything from a reserved area */
view
->
flags
|=
VFLAG_SYSTEM
;
delete_view
(
view
);
}
...
...
loader/kthread.c
View file @
c79cf02f
...
...
@@ -190,8 +190,8 @@ static void cleanup_thread( void *ptr )
/* copy the info structure since it is on the stack we will free */
struct
wine_pthread_thread_info
info
=
*
(
struct
wine_pthread_thread_info
*
)
ptr
;
wine_ldt_free_fs
(
info
.
teb_sel
);
munmap
(
info
.
stack_base
,
info
.
stack_size
);
munmap
(
info
.
teb_base
,
info
.
teb_size
);
if
(
info
.
stack_size
)
munmap
(
info
.
stack_base
,
info
.
stack_size
);
if
(
info
.
teb_size
)
munmap
(
info
.
teb_base
,
info
.
teb_size
);
#ifdef HAVE__LWP_CREATE
_lwp_exit
();
#endif
...
...
loader/pthread.c
View file @
c79cf02f
...
...
@@ -159,7 +159,7 @@ static void *get_current_teb(void)
static
void
DECLSPEC_NORETURN
exit_thread
(
struct
wine_pthread_thread_info
*
info
)
{
wine_ldt_free_fs
(
info
->
teb_sel
);
munmap
(
info
->
teb_base
,
info
->
teb_size
);
if
(
info
->
teb_size
)
munmap
(
info
->
teb_base
,
info
->
teb_size
);
pthread_exit
(
(
void
*
)
info
->
exit_status
);
}
...
...
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