Otherwise, it's possible for the old handle to be re-added to the cache between
removing and closing it.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
If another thread creates and accesses a file between the dup_handle request and
the call to remove_fd_from_cache(), the file may be allocated to the same handle
number, and that thread will then receive the wrong unix fd. Avoid this race by
invalidating the cache first.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
WoW64 process has two separate contexts:
- x86 context used most of the time (e.g. by application code)
- x86_64 context used by system when it quits x86 emulation and jumps to
the kernel code
A notable exception are debug registers - their state is shared. Some
debuggers make use of that fact and sets/gets debug registers of x86
processes using x86_64 thread context.
Add support for setting and getting debug registers using x86_64
thread context. Getting other registers is allowed too and will return
values from x86 thread context.
Fixes hardware breakpoints in IDA 7.0 disassembler (x86_64 app) when
debugging x86 (32 bit) applications.
Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Syscall param writev(vector[...]) points to uninitialised byte(s)
at 0x4189DA3: writev (writev.c:26)
by 0x46A5A1B: send_request (server.c:213)
by 0x46A5A1B: server_call_unlocked (server.c:273)
by 0x46CA54F: virtual_locked_server_call (virtual.c:2993)
by 0x4681C9A: server_ioctl_file (file.c:4789)
by 0x468B326: NtDeviceIoControlFile (file.c:5620)
by 0x468B7AF: get_mountmgr_fs_info (file.c:1986)
by 0x468B7AF: get_mountmgr_fs_info (file.c:1955)
by 0x468FCBB: NtQueryVolumeInformationFile (file.c:6483)
by 0x4677E88: __wine_syscall_dispatcher_xsave (in /home/rbernon/Code/build-wine/wine64/dlls/ntdll/ntdll.so)
by 0x7BC0DEB3: NtQueryVolumeInformationFile (in /home/rbernon/Code/build-wine/wine64/dlls/ntdll/ntdll.dll)
by 0x7B01F127: GetFileInformationByHandle (file.c:2938)
by 0x7096A5C3: _fstat64 (file.c:1791)
by 0x7096A941: _fstat64i32 (file.c:1877)
Address 0x7ffffe30e520 is in a rw- anonymous segment
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Invalid read of size 1
at 0x7BC5C5E3: memcpy (string.c:109)
by 0x7BC267F7: RtlCreateProcessParametersEx (env.c:785)
by 0x7B04EB57: create_process_params (process.c:183)
by 0x7B04EB57: CreateProcessInternalW (process.c:544)
by 0x7B0508E3: CreateProcessW (process.c:668)
by 0x403B1E: runCmd (wineboot.c:1055)
by 0x403B1E: process_run_key (wineboot.c:1126)
by 0x404228: ProcessRunKeys (wineboot.c:1159)
by 0x406DB1: main (wineboot.c:1707)
Address 0x7ffffe00331a is 0 bytes after a recently re-allocated block of size 12,074 alloc'd
at 0x7BC2D209: notify_alloc (heap.c:260)
by 0x7BC2D209: RtlAllocateHeap (heap.c:1713)
by 0x7BC25BAC: RtlSetEnvironmentVariable (env.c:515)
by 0x7BC25EE0: set_env_var (env.c:61)
by 0x7BC26C37: set_wow64_environment (env.c:228)
by 0x7BC26C37: init_user_process_params (env.c:891)
by 0x7BC3B01B: process_init (loader.c:3991)
by 0x7BC3CD24: __wine_set_unix_funcs (loader.c:4095)
by 0x469604E: start_main_thread (loader.c:1752)
by 0x469604E: __wine_main (loader.c:2083)
by 0x7D001231: main (main.c:157)
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Syscall param writev(vector[...]) points to uninitialised byte(s)
at 0x4189DA3: writev (writev.c:26)
by 0x46A5A0B: send_request (server.c:213)
by 0x46A5A0B: server_call_unlocked (server.c:273)
by 0x46A5B4F: wine_server_call (server.c:289)
by 0x46C996A: virtual_create_builtin_view (virtual.c:2524)
by 0x4692CB4: dlopen_dll (loader.c:1133)
by 0x46931CA: open_builtin_file (loader.c:1373)
by 0x46931CA: open_builtin_file (loader.c:1354)
by 0x4694559: load_builtin_dll (loader.c:1457)
by 0x7BC375F2: load_builtin_dll (loader.c:2348)
by 0x7BC38369: load_dll (loader.c:2705)
by 0x7BC39E46: import_dll (loader.c:782)
by 0x7BC36CEC: fixup_imports (loader.c:1138)
by 0x7BC3BE4B: LdrInitializeThunk (loader.c:3454)
Address 0x32e390 is on thread 1's stack
in frame #5, created by open_builtin_file (loader.c:1357)
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>