Skip to content

Instantly share code, notes, and snippets.

@VOID001
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VOID001/b3268ce9ff754d7c1d77 to your computer and use it in GitHub Desktop.
Save VOID001/b3268ce9ff754d7c1d77 to your computer and use it in GitHub Desktop.

wine-staging BUGFIX #471

20150729

  • BUG Replay Successful
  • Locate bug on function convert_links_in_hashtable
  • When exec wget -k www.baidu.com (CRASH) The structure "downloaded_html_set" looks like this:
$16 = {
	hash_function = 0x40ddac <hash_string>,
	test_function = 0x40df70 <cmp_string>,
	cells = 0x20127c30,
	size = 13,
	count = 1,
	resize_threshold = 9,
	prime_offset = 1
}
  • When exec wget baidu.com (DO NOT CRASH) The structure "downloaded_html_set" looks like this
$17 = {
	hash_function = 0x40ddac <hash_string>,
	test_function = 0x40df70 <cmp_string>,
	cells = 0x20044dc8,			//ONLY DIFFRENCE HERE
	size = 13,
	count = 1,
	resize_threshold = 9,
	prime_offset = 1
}

breakpoint at 1761 convert_all_links()

SegmentFault On convert__all_links()->convert_links_in_hashtable()->convert_links()->fwrite

20150730

  • DEBUG START using script for gdb to debug gdbscripts.sh
#!/bin/bash

set logging file LOG
set logging on
b convert_all_links
run -k www.baidu.com
n
n
n
s
until 160
s
until 292
echo Now Running on 14 Line\n
set print pretty on
echo Now Printing *p\n
print *p
echo "Now Running on 17 Line\n"
p p
p fm
p *fm
bt
continue
quit

I run gdb wget.exe --command=gdbscripts.sh then get the log output like this gdb_log_msys.log

Breakpoint 1 at 0x403691: file convert.c, line 186.
[New Thread 151.0x5a]
[New Thread 151.0x45]
[New Thread 151.0x3a]
Breakpoint 1, convert_all_links () at convert.c:186
186	{
188	  int file_count = 0;
190	  struct ptimer *timer = ptimer_new ();
192	  convert_links_in_hashtable (downloaded_html_set, 0, &file_count);
convert_links_in_hashtable (downloaded_set=0x20044c30, is_css=is_css@entry=0, 
    file_count=file_count@entry=0x67c98c) at convert.c:72
72	  if (downloaded_set)
convert_links_in_hashtable (downloaded_set=<optimized out>, is_css=is_css@entry=0, 
    file_count=file_count@entry=0x67c98c) at convert.c:161
161	      convert_links (file, urls);
convert_links (file=file@entry=0x20044cc0 "index.html", links=links@entry=0x20044f60) at convert.c:215
215	{
convert_links (file=file@entry=0x20044cc0 "index.html", links=links@entry=0x20044f60) at convert.c:296
296	      fwrite (p, 1, url_start - p, fp);
Now Running on 14 Line
Now Printing *p
gdbscript.sh:17: Error in sourced command file:
Cannot access memory at address 0x81fd0000
"Now Running on 17 Line
"$1 = 0x81fd0000 <error: Cannot access memory at address 0x81fd0000>
$2 = (struct file_memory *) 0x20044ac0
$3 = {
  content = 0x81fd0000 <error: Cannot access memory at address 0x81fd0000>, 
  length = 95520, 
  mmap_p = 1
}
#0  convert_links (file=file@entry=0x20044cc0 "index.html", links=links@entry=0x20044f60)
    at convert.c:296
#1  0x0040366b in convert_links_in_hashtable (downloaded_set=<optimized out>, is_css=is_css@entry=0, 
    file_count=file_count@entry=0x67c98c) at convert.c:161
#2  0x004036b9 in convert_all_links () at convert.c:192
#3  0x0041dc24 in main (argc=3, argv=0x67cadc) at main.c:1761
Continuing.
[Thread 151.0x45 exited with code 35584]
[Thread 151.0x3a exited with code 35584]
[Inferior 1 (process 151) exited with code 0105400]

And I we can get more information here: "Cannot access memory at address 0x81fd0000" This is when I exec p *p And p is born from fm->content So I think there is something wrong When getting fm


Further debugging needed

##20150731

  • Now Bug Can be accurately locate on convert.c,line 266 More details below When excuting line 266 fp = fopen(file,"wb") Then the fm structure is inaccessible And here is a short bug_replay.c which can reproduce the same bug as wget -k www.baidu.com
/*************************************************************************
   > File Name: bug_replay.c
   > Author: VOID_133
   > ################### 
   > Mail: ################### 
   > Created Time: Fri 31 Jul 2015 10:36:27 AM CST
************************************************************************/
#include<stdio.h>
#include<stdlib.h>
#include<sys/mman.h>
#include<sys/stat.h>
#include<fcntl.h>

struct file_memory{
   char* content;
   long length;
   int mmap_p;
};

struct file_memory* fun(const char* file)
{
   struct file_memory *fm;
   int fd;
   struct stat buf; fd = open(file, O_RDONLY);
   fm = malloc(sizeof(struct file_memory));
   fstat(fd, &buf);
   fm->length = buf.st_size;
   fm->content = mmap(NULL, fm->length, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
   return fm;
}

int main(void)
{
   struct file_memory *fm;
   char file[100]="test.file";
   fm = fun(file);
   printf("%s\n",fm->content);
   FILE *fp = fopen(file,"wb");
   printf("%s\n",fm->content);
   return 0;
}

Here is anoher code which is shorter and can also produce the same bug

bug_replay.c

/*************************************************************************
   > File Name: bug_replay.c
   > Author: VOID_133
   > ################### 
   > Mail: ################### 
   > Created Time: Fri 31 Jul 2015 10:36:27 AM CST
************************************************************************/
#include<stdio.h>
#include<stdlib.h>
#include<sys/mman.h>
#include<sys/stat.h>
#include<fcntl.h>

struct file_memory{
   char* content;
   long length;
   int mmap_p;
};

struct file_memory *fun(const char* file)
{
   struct file_memory *fm;
   int fd;
   struct stat buf; 
   fd = open(file, O_RDONLY);
   fm = malloc(sizeof(struct file_memory));
   fstat(fd, &buf);
   fm->length = buf.st_size;
   fm->content = mmap(NULL, fm->length, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
   return fm;
}

char *fun1(const char *file)
{
   struct stat buf; 
   char *p = malloc(sizeof(char));
   int fd;
   fd = open(file, O_RDONLY);
   fstat(fd, &buf);
   printf("buf=0x%X\n",&buf);
   p = mmap(NULL, buf.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
   return p;
}

int main(void)
{
   struct file_memory *fm;
   char file[100]="test.file";
   char *p;
   p = fun1(file);
   printf("%s\n",p);
   FILE *fp = fopen(file,"wb");
   printf("%s\n",p);
   return 0;
}

  • How do I locate the BUG
  • First use GDB to locate the range of the bug occur ( You can locate to function )
  • Then Use Stepping in the function to see when we get the Segfault
  • Then see what cause Segfault (In this case , it's because fm->content is inaccessible DENY ACCESS)
  • Then we should try to find when the fm->content is inaccessible
  • We can know when return from wget_read_file , the fm->content is accessible, So we should figure out when fm->content become inacessible
  • Using BinarySearch to accurately locate to line (On which line fm->content become inacessilbe)
  • Then we can know what cause fm->content become inacessible

##20150806

  • Now trying to print out structure fm when running in msys-runtime functions(such as _fopen64_r)

  • First here is the gdb debugging information about my sample program (bug_replay.c)

$ gdb ./new.exe

Reading symbols from ./new.exe...done.
(gdb) l
34      {
35              struct stat buf;
36              char *p = malloc(10000*sizeof(char));
37              int fd;
38              fd = open(file, O_RDONLY);
39              fstat(fd, &buf);
40              printf("buf=0x%X\n",&buf);
41              p = mmap(NULL, buf.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
42              return p;
43      }
(gdb) start
Temporary breakpoint 1 at 0x401302: file bug_replay.c, line 48.
Starting program: /home/void001/bug471_replay/new.exe
[New Thread 42.0x16]
[New Thread 42.0x40]

Temporary breakpoint 1, main () at bug_replay.c:48
48              char file[100]="test.file";
(gdb) n
50              p = fun1(file);
(gdb) n
52              printf("%s\n",p);
(gdb) p p
$1 = 0x81fe0000 "Rabbit\n"
(gdb) n
53              FILE *fp = fopen(file,"wb");
(gdb) l
48              char file[100]="test.file";
49              char *p;
50              p = fun1(file);
51              //printf("%s\n",fm->content);
52              printf("%s\n",p);
53              FILE *fp = fopen(file,"wb");
54              printf("%s\n",p);
55              //printf("%s\n",fm->content);
56              return 0;
57      }
(gdb) s
_sigfe_fopen64 () at sigfe.s:1952
1952            pushl   $_fopen64
(gdb) n
_sigfe_fopen64 () at sigfe.s:1953
1953            jmp     __sigfe
(gdb)
_sigfe () at sigfe.s:19
/* This block is not Important */
19              pushl   %ebx
20              pushl   %edx
21              movl    %fs:4,%ebx                      # location of bottom of stack
22      1:      movl    $1,%eax                 # potential lock value
23              xchgl   %eax,-8880(%ebx)        # see if we can grab it
24              movl    %eax,-8884(%ebx)        # flag if we are waiting for lock
25              testl   %eax,%eax                       # it will be zero
26              jz      2f                              #  if so
29      2:      movl    $4,%eax                 # have the lock, now increment the
30              xadd    %eax,-8876(%ebx)        #  stack pointer and get pointer
31              leal    __sigbe,%edx                    # new place to return to
32              xchgl   %edx,12(%esp)                   # exchange with real return value
33              movl    %edx,(%eax)                     # store real return value on alt stack
34              incl    -8888(%ebx)
35              decl    -8880(%ebx)             # remove lock
36              popl    %edx                            # restore saved value
(gdb)
_sigfe () at sigfe.s:37
37              popl    %ebx
(gdb)
_sigfe () at sigfe.s:38
38              ret
/* This block is not Important */
(gdb)
fopen64 (file=0x61caa4 "test.file", mode=0x40306e "wb")
   at /home/void001/MSYS2-packages/msys2-runtime/src/msys2-runtime/newlib/libc/stdio64/fopen64.c:134
134     {
(gdb) bt
#0  fopen64 (file=0x61caa4 "test.file", mode=0x40306e "wb")
   at /home/void001/MSYS2-packages/msys2-runtime/src/msys2-runtime/newlib/libc/stdio64/fopen64.c:134
#1  0x610eec7d in _sigfe () at sigfe.s:38
#2  0x49435341 in ?? ()
#3  0x610082a8 in cygwin_exit_return ()
   at /home/void001/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/cygwin/dcrt0.cc:1049
#4  0x6100591d in _cygtls::call2(unsigned long (*)(void*, void*), void*, void*)@16 (
   this=0x61ce64, func=0x61007cc3 <dll_crt0_1(void*)>, arg=0x0, buf=0x61cc18)
   at /home/void001/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/cygwin/cygtls.cc:111
#5  0x61005786 in _cygtls::call (func=0x61007cc3 <dll_crt0_1(void*)>, arg=0x0)
   at /home/void001/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/cygwin/cygtls.cc:30
#6  0x61008375 in _dll_crt0@0 ()
   at /home/void001/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/cygwin/dcrt0.cc:1106
#7  0x004013f3 in msys_crt0 (f=0x4012f3 <main>)
   at /home/void001/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/cygwin/lib/cygwin_crt0.c:30
#8  0x00401015 in mainCRTStartup ()
   at /home/void001/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/cygwin/crt0.c:34
(gdb) n
135       return _fopen64_r (_REENT, file, mode);
(gdb) s
_fopen64_r (ptr=0x61d51c, file=0x61caa4 "test.file", mode=0x40306e "wb")
   at /home/void001/MSYS2-packages/msys2-runtime/src/msys2-runtime/newlib/libc/stdio64/fopen64.c:87
87        if ((flags = __sflags (ptr, mode, &oflags)) == 0)
(gdb) l
82      {
83        register FILE *fp;
84        register int f;
85        int flags, oflags;
86
87        if ((flags = __sflags (ptr, mode, &oflags)) == 0)
88          return NULL;
89        if ((fp = __sfp (ptr)) == NULL)
90          return NULL;
91
(gdb) l
92        if ((f = _open64_r (ptr, file, oflags, 0666)) < 0)
93          {
94            _newlib_sfp_lock_start ();
95            fp->_flags = 0;           /* release */
96      #ifndef __SINGLE_THREAD__
97            __lock_close_recursive (fp->_lock);
98      #endif
99            _newlib_sfp_lock_end ();
100           return NULL;
101         }
(gdb) l
102
103       _newlib_flockfile_start (fp);
104
105       fp->_file = f;
106       fp->_flags = flags;
107       fp->_cookie = (_PTR) fp;
108       fp->_read = __sread;
109       fp->_write = __swrite64;
110       fp->_seek = __sseek;
111       fp->_seek64 = __sseek64;


From this we can see that fopen calls fopen64 then fopen64 calls _fopen64_r,

##20150810

  • Using gdb with msys2-runtime source debugging in msys2-runtime functions And get final result
  • The details are shown below

First run gdb new.exe , Then step in fopen then step in _fopen64 then stepin _fopen64_r , in _fopen64_r run to line 92 _open64_r and step in, Then run to line 62 _open64 and step in , Continue running to line 1437 fh->open_with_arch and step in . We can see it goes into the source of winsup/cygwin/fhandler.cc, Then continue , run to line 466 in fhandler_base::open_with_arch and then step in function open , Then we can see in fhandler_base::open it calls Windows Nt function(In wine it's Wine ntdll functions) And when it calls line 734 : NtSetInformationFile. the bug occurs, details about the debugging process in fhandler_base::open is shown below

546     fhandler_base::open (int flags, mode_t mode)
547     {
548       int res = 0;
549       HANDLE fh;
550       ULONG file_attributes = 0;
551       ULONG shared = (get_major () == DEV_TAPE_MAJOR ? 0 : FILE_SHARE_VALID_FLAGS);
552       ULONG create_disposition;
(gdb) s
550       ULONG file_attributes = 0;
(gdb) s
551       ULONG shared = (get_major () == DEV_TAPE_MAJOR ? 0 : FILE_SHARE_VALID_FLAGS);
(gdb) s
fhandler_base::get_major (this=0x612f9154)
    at /home/void001/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/cygwin/fhandler.h:219
219       _major_t get_major () { return dev ().get_major (); }
(gdb) p $1
$5 = 0x81fe0000 "www\n"
(gdb) finish
Run till exit from #0  fhandler_base::get_major (this=0x612f9154)
    at /home/void001/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/cygwin/fhandler.h:219
0x61041c73 in fhandler_base::open (this=0x612f9154, flags=1148417, mode=420)
    at /home/void001/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/cygwin/fhandler.cc:551
551       ULONG shared = (get_major () == DEV_TAPE_MAJOR ? 0 : FILE_SHARE_VALID_FLAGS);
Value returned is $6 = 0
(gdb) p $2
$7 = 0x81fe0000 "www\n"
(gdb) n
556       PFILE_FULL_EA_INFORMATION p = NULL;
(gdb)
557       ULONG plen = 0;
(gdb)
559       syscall_printf ("(%S, %y)", pc.get_nt_native_path (), flags);
(gdb)
561       pc.get_object_attr (attr, *sec_none_cloexec (flags));
(gdb)
563       options = FILE_OPEN_FOR_BACKUP_INTENT;
(gdb) p $1
$8 = 0x81fe0000 "www\n"
(gdb) n
564       switch (query_open ())
(gdb) n
582           switch (flags & O_ACCMODE)
(gdb) p $1
$9 = 0x81fe0000 "www\n"
(gdb) n
588               access = GENERIC_WRITE | READ_CONTROL | FILE_READ_ATTRIBUTES;
(gdb) n
589               break;
(gdb) n
594           if (flags & O_SYNC)
(gdb) n
596           if (flags & O_DIRECT)
(gdb) n
598           if (get_major () != DEV_SERIAL_MAJOR && get_major () != DEV_TAPE_MAJOR)
(gdb) n
600               options |= FILE_SYNCHRONOUS_IO_NONALERT;
(gdb) p $1
$10 = 0x81fe0000 "www\n"
(gdb) n
601               access |= SYNCHRONIZE;
(gdb) p $1
$11 = 0x81fe0000 "www\n"
(gdb) n
603           break;
(gdb) p $1
$12 = 0x81fe0000 "www\n"
(gdb) n
608       if ((flags & O_EXCL) && (flags & O_CREAT))
(gdb) p $1
$13 = 0x81fe0000 "www\n"
(gdb) n
611         create_disposition = (flags & O_CREAT) ? FILE_OPEN_IF : FILE_OPEN;
(gdb) p $1
$14 = 0x81fe0000 "www\n"
(gdb) n
613       if (get_device () == FH_FS)
(gdb) n
617           if (pc.is_rep_symlink ())
(gdb) p $1
$15 = 0x81fe0000 "www\n"
(gdb) n
620           if (pc.fs_is_nfs ())
(gdb) p $1
$16 = 0x81fe0000 "www\n"
(gdb) n
640               && has_attribute (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM))
(gdb) p $1
$17 = 0x81fe0000 "www\n"
(gdb) n
639           if (create_disposition == FILE_CREATE
(gdb) p $1
$18 = 0x81fe0000 "www\n"
(gdb) n
643           if (flags & O_CREAT)
(gdb) p $1
$19 = 0x81fe0000 "www\n"
(gdb) p $1
$20 = 0x81fe0000 "www\n"
(gdb) n
645               file_attributes |= FILE_ATTRIBUTE_NORMAL;
(gdb) p $1
$21 = 0x81fe0000 "www\n"
(gdb) n
647               if (pc.fs_is_nfs ())
(gdb) p $1
$22 = 0x81fe0000 "www\n"
(gdb) n
667               else if (!has_acls () && !(mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
(gdb) p $1
$23 = 0x81fe0000 "www\n"
(gdb) n
672               pc.file_attributes (file_attributes);
(gdb) n
684                              create_disposition, options, p, plen);
(gdb) p $1
$24 = 0x81fe0000 "www\n"
(gdb) n
685       if (!NT_SUCCESS (status))
(gdb) p $1
$25 = 0x81fe0000 "www\n"
(gdb) n
718       if (io.Information == FILE_CREATED && has_acls ())
(gdb) p $1
$26 = 0x81fe0000 "www\n"
(gdb) n
728       if ((flags & O_TRUNC)
(gdb) p $1
$27 = 0x81fe0000 "www\n"
(gdb) n
731           && get_device () == FH_FS)
(gdb) p $1
$28 = 0x81fe0000 "www\n"
(gdb) n
729           && (flags & O_ACCMODE) != O_RDONLY
(gdb) p $1
$29 = 0x81fe0000 "www\n"
(gdb) n
730           && io.Information != FILE_CREATED
(gdb) p $1
$30 = 0x81fe0000 "www\n"
(gdb) n
731           && get_device () == FH_FS)
(gdb) p $1
$31 = 0x81fe0000 "www\n"
(gdb) n
728       if ((flags & O_TRUNC)
(gdb) p $1
$32 = 0x81fe0000 "www\n"
(gdb) n
733           FILE_END_OF_FILE_INFORMATION feofi = { EndOfFile:{ QuadPart:0 } };
(gdb) p $1
$33 = 0x81fe0000 "www\n"
(gdb) n
735                                          FileEndOfFileInformation);
(gdb) p $1
$34 = 0x81fe0000 "www\n"
(gdb) n
739           if (!NT_SUCCESS (status))
(gdb) p $1
$35 = 0x81fe0000 <error: Cannot access memory at address 0x81fe0000>
(gdb) l 734
729           && (flags & O_ACCMODE) != O_RDONLY
730           && io.Information != FILE_CREATED
731           && get_device () == FH_FS)
732         {
733           FILE_END_OF_FILE_INFORMATION feofi = { EndOfFile:{ QuadPart:0 } };
734           status = NtSetInformationFile (fh, &io, &feofi, sizeof feofi,
735                                          FileEndOfFileInformation);
736           /* In theory, truncating the file should never fail, since the opened
737              handle has FILE_WRITE_DATA permissions, which is all you need to
738              be allowed to truncate a file.  Better safe than sorry. */
(gdb) p status
$36 = 0

  • These lines are where bug occurs 734     status = NtSetInformationFile (fh, &io, &feofi, sizeof feofi, 735     FileEndOfFileInformation);

  • Summary: Now we have successfully locate the bug in Wine. We need to find out why it happens and then we can come to develop on it.


  • Following Plan
  1. Coding the raw Wine API version to replay the bug
  2. Read the source code of NtSetInformationFile and arg with FileEndOfFileInformation
  3. Learn deep into the implementation of NtSetInformationFile with arg FileEndOfFileInformation
  4. Use debugging result

##20150814

  • Finished debugging in MSYS2 , Now need to write raw Wine API version to replay the bug
  • Using WINEDEBUG=+relay to know the Systemcall done by my bug471_replay.exe
  • My Final WINEDEBUG parameter is WINEDEBUG=+relay,+ntdll,+file,+server,+tid,+virtual wine start msys2_shell.bat 2>> /tmp/RELAY_0.log
  • Now have got the relay log , and make it smaller and more accurate Below is a summary of the log, log is attached as attachment#1 (See attachment)
  • From the log we can find some vital system calls , such as NtCreateFile NtMapViewOfSection NtSetInformationFile, and I tried to map these calls to my bug471_replay.c functions , Mapping result is attached as attachment#2
  • Now I have got the bigger picture of how does does my program interact with system calls , And below is a draft of My Conclusion (See attachment#3)

####Attachment

attachment#1

000b:Call ntdll.NtCreateFile(0061b598,00020088,0061b578,0061b570,00000000,00000000,00000007,00000001,00204000,611aea20,00000018) ret=610bd36b
000b:trace:ntdll:FILE_CreateFile handle=0x61b598 access=00020088 name=L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" objattr=00000000 root=(nil) sec=(nil) io=0x61b570 alloc_size=(nil) attr=00000000 sharing=00000007 disp=1 options=00204000 ea=0x611aea20.0x00000018
000b:trace:file:wine_nt_to_unix_file_name L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" -> "/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file"
000b: create_file( access=00020088, attributes=00000000, sharing=00000007, create=1, options=00204000, attrs=00000000, objattr={rootdir=0000,sd={},name=L""}, filename="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" )
000b: create_file() = 0 { handle=00c4 }
000b:Ret  ntdll.NtCreateFile() retval=00000000 ret=610bd36b
000b: get_handle_fd( handle=00c4 )
000b: *fd* 00c4 -> 138
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=00020088, options=00204000 }
000b: get_handle_unix_name( handle=00c4 )
000b: get_handle_unix_name() = 0 { name_len=77, name="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" }
000b:Call ntdll.NtClose(000000c4) ret=610bdf56
000b: close_handle( handle=00c4 )
000b: close_handle() = 0
000b:Ret  ntdll.NtClose() retval=00000000 ret=610bdf56
000b:Call KERNEL32.DuplicateHandle(ffffffff,00000000,ffffffff,612fb360,00000000,00000001,00000002) ret=611a39fd
000b: dup_handle( src_process=ffffffff, src_handle=0000, dst_process=ffffffff, access=00000000, attributes=00000002, options=00000002 )
000b: dup_handle() = INVALID_HANDLE { handle=0000, self=1, closed=0 }
000b:Ret  KERNEL32.DuplicateHandle() retval=00000000 ret=611a39fd
000b:Call ntdll.NtCreateFile(0061c828,80100000,0061c810,0061c808,00000000,00000000,00000007,00000001,00004020,00000000,00000000) ret=61042125
000b:trace:ntdll:FILE_CreateFile handle=0x61c828 access=80100000 name=L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" objattr=00000002 root=(nil) sec=(nil) io=0x61c808 alloc_size=(nil) attr=00000000 sharing=00000007 disp=1 options=00004020 ea=(nil).0x00000000
000b:trace:file:wine_nt_to_unix_file_name L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" -> "/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file"
000b: create_file( access=80100000, attributes=00000002, sharing=00000007, create=1, options=00004020, attrs=00000000, objattr={rootdir=0000,sd={},name=L""}, filename="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" )
000b: create_file() = 0 { handle=00c4 }
000b:Ret  ntdll.NtCreateFile() retval=00000000 ret=61042125
000b: get_handle_fd( handle=00c4 )
000b: *fd* 00c4 -> 138
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=00120089, options=00004020 }
000b:Call ntdll.NtAllocateLocallyUniqueId(612fb2b8) ret=6119fe18
000b:trace:ntdll:NtAllocateLocallyUniqueId 0x612fb2b8
000b: allocate_locally_unique_id( )
000b: allocate_locally_unique_id() = 0 { luid=0.1307 }
000b:Ret  ntdll.NtAllocateLocallyUniqueId() retval=00000000 ret=6119fe18
000b: get_handle_unix_name( handle=00c4 )
000b: get_handle_unix_name() = 0 { name_len=77, name="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" }
000b:Call ntdll.NtOpenFile(0061c8c4,00100001,0061c8ac,0061c8a4,00000007,00004020) ret=6104e456
000b:trace:ntdll:FILE_CreateFile handle=0x61c8c4 access=00100001 name=L"" objattr=00000000 root=0xc4 sec=(nil) io=0x61c8a4 alloc_size=(nil) attr=00000000 sharing=00000007 disp=1 options=00004020 ea=(nil).0x00000000
000b:trace:file:nt_to_unix_file_name_attr L"" not found in .
000b: open_file_object( access=00100001, attributes=00000000, rootdir=00c4, sharing=00000007, options=00004020, filename=L"" )
000b: open_file_object() = 0 { handle=00c8 }
000b: get_handle_fd( handle=00c8 )
000b: *fd* 00c8 -> 150
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=00100001, options=00004020 }
000b:Ret  ntdll.NtOpenFile() retval=00000000 ret=6104e456
000b:Call ntdll.NtReadFile(000000c8,00000000,00000000,00000000,0061c8a4,0061c895,00000003,0061c898,00000000) ret=6104e50e
000b:trace:ntdll:NtReadFile (0xc8,(nil),(nil),(nil),0x61c8a4,0x61c895,0x00000003,0x61c898,(nil)),partial stub!
000b:trace:ntdll:NtReadFile = SUCCESS (3)
000b:Ret  ntdll.NtReadFile() retval=00000000 ret=6104e50e
000b:Call ntdll.NtClose(000000c8) ret=6104e5b1
000b: close_handle( handle=00c8 )
000b: close_handle() = 0
000b:Ret  ntdll.NtClose() retval=00000000 ret=6104e5b1
000b:Call ntdll.NtCreateEvent(0061c374,001f0003,0061c354,00000001,00000000) ret=6108d6a7
000b: create_event( access=001f0003, attributes=00000000, manual_reset=0, initial_state=0, objattr={rootdir=0000,sd={},name=L""} )
000b: create_event() = 0 { handle=00c8 }
000b:Ret  ntdll.NtCreateEvent() retval=00000000 ret=6108d6a7
000b:Call KERNEL32.GetSystemTimeAsFileTime(0061c470) ret=611195f2
000b:Ret  KERNEL32.GetSystemTimeAsFileTime() retval=01d0d675 ret=611195f2
000b: get_security_object( handle=0174, security_info=00000007 )
000b: get_security_object() = 0 { sd_len=000000c8, sd={control=00001014,owner={S-1-5-21-0-0-0-1000},group={S-1-5-21-0-0-0-513},sacl={},dacl={{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=1f019f,AceFlags=0,Sid={S-1-5-21-0-0-0-1000}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=120196,AceFlags=0,Sid={S-1-5-21-0-0-0-513}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=1f0000,AceFlags=0,Sid={S-1-5-32-544}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=120080,AceFlags=0,Sid={S-1-1-0}}}} }
000b: get_security_object( handle=0174, security_info=00000007 )
000b: get_security_object() = 0 { sd_len=000000c8, sd={control=00001014,owner={S-1-5-21-0-0-0-1000},group={S-1-5-21-0-0-0-513},sacl={},dacl={{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=1f019f,AceFlags=0,Sid={S-1-5-21-0-0-0-1000}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=120196,AceFlags=0,Sid={S-1-5-21-0-0-0-513}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=1f0000,AceFlags=0,Sid={S-1-5-32-544}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=120080,AceFlags=0,Sid={S-1-1-0}}}} }
000b:Call ntdll.NtCreateFile(0061b278,00020088,0061b258,0061b250,00000000,00000000,00000007,00000001,00204000,611aea20,00000018) ret=610bd36b
000b:trace:ntdll:FILE_CreateFile handle=0x61b278 access=00020088 name=L"\\??\\C:\\msys32\\dev" objattr=00000000 root=(nil) sec=(nil) io=0x61b250 alloc_size=(nil) attr=00000000 sharing=00000007 disp=1 options=00204000 ea=0x611aea20.0x00000018
000b:trace:file:wine_nt_to_unix_file_name L"\\??\\C:\\msys32\\dev" -> "/home/void001/.wine/dosdevices/c:/msys32/dev"
000b: create_file( access=00020088, attributes=00000000, sharing=00000007, create=1, options=00204000, attrs=00000000, objattr={rootdir=0000,sd={},name=L""}, filename="/home/void001/.wine/dosdevices/c:/msys32/dev" )
000b: create_file() = 0 { handle=00cc }
000b:Ret  ntdll.NtCreateFile() retval=00000000 ret=610bd36b
000b: get_handle_fd( handle=00cc )
000b: *fd* 00cc -> 150
000b: get_handle_fd() = 0 { type=2, cacheable=1, access=00020088, options=00204000 }
000b: get_handle_unix_name( handle=00cc )
000b: get_handle_unix_name() = 0 { name_len=44, name="/home/void001/.wine/dosdevices/c:/msys32/dev" }
000b:Call KERNEL32.DuplicateHandle(ffffffff,000000cc,ffffffff,612f8804,00000000,00000001,00000002) ret=611a39fd
000b: dup_handle( src_process=ffffffff, src_handle=00cc, dst_process=ffffffff, access=00000000, attributes=00000002, options=00000002 )
000b: dup_handle() = 0 { handle=00d0, self=1, closed=0 }
000b:Ret  KERNEL32.DuplicateHandle() retval=00000001 ret=611a39fd
000b: get_handle_fd( handle=00d0 )
000b: *fd* 00d0 -> 150
000b: get_handle_fd() = 0 { type=2, cacheable=1, access=00020088, options=00204000 }
000b:Call KERNEL32.CloseHandle(000000d0) ret=611a3a54
000b: close_handle( handle=00d0 )
000b: close_handle() = 0
000b:Ret  KERNEL32.CloseHandle() retval=00000001 ret=611a3a54
000b:Call KERNEL32.CloseHandle(000000cc) ret=611a3a54
000b: close_handle( handle=00cc )
000b: close_handle() = 0
000b:Ret  KERNEL32.CloseHandle() retval=00000001 ret=611a3a54
000b:Call KERNEL32.VirtualAlloc(20040000,00010000,00001000,00000004) ret=6108ba74
000b:trace:virtual:NtAllocateVirtualMemory 0xffffffff 0x20040000 00010000 1000 00000004
000b:trace:virtual:VIRTUAL_SetProt 0x20040000-0x2004ffff c-rw-
000b:trace:virtual:mprotect_exec forcing exec permission on 0x20040000-0x2004ffff
000b:trace:virtual:VIRTUAL_DumpView View: 0x20000000 - 0x37ffffff (valloc)
000b:trace:virtual:VIRTUAL_DumpView       0x20000000 - 0x2004ffff c-rw-
000b:trace:virtual:VIRTUAL_DumpView       0x20050000 - 0x37ffffff -----
000b:Ret  KERNEL32.VirtualAlloc() retval=20040000 ret=6108ba74
000b:Call KERNEL32.WaitForSingleObject(0000016c,00000064) ret=61077b89
000b: select( flags=2, cookie=0061bdfc, timeout=+0.1000000, prev_apc=0000, result={}, data={WAIT,handles={016c}} )
000b: select() = 0 { timeout=1d0d675a314b614 (+0.1000000), call={APC_NONE}, apc_handle=0000 }
000b:Ret  KERNEL32.WaitForSingleObject() retval=00000000 ret=61077b89
000b:Call KERNEL32.ReleaseMutex(0000016c) ret=61077bf3
000b: release_mutex( handle=016c )
000b: release_mutex() = 0 { prev_count=00000001 }
000b:Ret  KERNEL32.ReleaseMutex() retval=00000001 ret=61077bf3
000b:Call KERNEL32.WriteFile(00000184,0061c2ff,0000000e,0061c400,00000000) ret=6107dad9
000b:trace:file:WriteFile 0x184 0x61c2ff 14 0x61c400 (nil)
000b:trace:ntdll:NtWriteFile (0x184,(nil),(nil),(nil),0x61c248,0x61c2ff,0x0000000e,(nil),(nil))!
000b: get_handle_fd( handle=0184 )
000b: *fd* 0184 -> 116
000b: get_handle_fd() = 0 { type=5, cacheable=1, access=00120196, options=00000060 }
000b:trace:ntdll:NtWriteFile = SUCCESS (14)
000b:Ret  KERNEL32.WriteFile() retval=00000001 ret=6107dad9
000b:Call ntdll.NtOpenFile(0061c974,a0100000,0061c978,0061c96c,00000007,00004020) ret=6109c098
000b:trace:ntdll:FILE_CreateFile handle=0x61c974 access=a0100000 name=L"" objattr=00000000 root=0xc4 sec=(nil) io=0x61c96c alloc_size=(nil) attr=00000000 sharing=00000007 disp=1 options=00004020 ea=(nil).0x00000000
000b:trace:file:nt_to_unix_file_name_attr L"" not found in .
000b: open_file_object( access=a0100000, attributes=00000000, rootdir=00c4, sharing=00000007, options=00004020, filename=L"" )
000b: open_file_object() = 0 { handle=00cc }
000b: get_handle_fd( handle=00cc )
000b: *fd* 00cc -> 150
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=001200a9, options=00004020 }
000b:Ret  ntdll.NtOpenFile() retval=00000000 ret=6109c098
000b:Call KERNEL32.DuplicateHandle(ffffffff,00000000,ffffffff,612f8804,00000000,00000001,00000002) ret=611a39fd
000b: dup_handle( src_process=ffffffff, src_handle=0000, dst_process=ffffffff, access=00000000, attributes=00000002, options=00000002 )
000b: dup_handle() = INVALID_HANDLE { handle=0000, self=1, closed=0 }
000b:Ret  KERNEL32.DuplicateHandle() retval=00000000 ret=611a39fd
000b: get_handle_unix_name( handle=00cc )
000b: get_handle_unix_name() = 0 { name_len=77, name="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" }
000b:Call ntdll.NtOpenFile(0061c7c4,00100001,0061c7ac,0061c7a4,00000007,00004020) ret=6104e456
000b:trace:ntdll:FILE_CreateFile handle=0x61c7c4 access=00100001 name=L"" objattr=00000000 root=0xcc sec=(nil) io=0x61c7a4 alloc_size=(nil) attr=00000000 sharing=00000007 disp=1 options=00004020 ea=(nil).0x00000000
000b:trace:file:nt_to_unix_file_name_attr L"" not found in .
000b: open_file_object( access=00100001, attributes=00000000, rootdir=00cc, sharing=00000007, options=00004020, filename=L"" )
000b: open_file_object() = 0 { handle=00d0 }
000b: get_handle_fd( handle=00d0 )
000b: *fd* 00d0 -> 153
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=00100001, options=00004020 }
000b:Ret  ntdll.NtOpenFile() retval=00000000 ret=6104e456
000b:Call ntdll.NtReadFile(000000d0,00000000,00000000,00000000,0061c7a4,0061c795,00000003,0061c798,00000000) ret=6104e50e
000b:trace:ntdll:NtReadFile (0xd0,(nil),(nil),(nil),0x61c7a4,0x61c795,0x00000003,0x61c798,(nil)),partial stub!
000b:trace:ntdll:NtReadFile = SUCCESS (3)
000b:Ret  ntdll.NtReadFile() retval=00000000 ret=6104e50e
000b:Call ntdll.NtClose(000000d0) ret=6104e5b1
000b: close_handle( handle=00d0 )
000b: close_handle() = 0
000b:Ret  ntdll.NtClose() retval=00000000 ret=6104e5b1
000b:Call ntdll.NtCreateEvent(0061c644,001f0003,0061c624,00000001,00000000) ret=6108d6a7
000b: create_event( access=001f0003, attributes=00000000, manual_reset=0, initial_state=0, objattr={rootdir=0000,sd={},name=L""} )
000b: create_event() = 0 { handle=00d0 }
000b:Ret  ntdll.NtCreateEvent() retval=00000000 ret=6108d6a7
000b:Call KERNEL32.VirtualAlloc(00000000,00010000,00102000,00000004) ret=6109c4be
000b:trace:virtual:NtAllocateVirtualMemory 0xffffffff (nil) 00010000 102000 00000004
000b:trace:virtual:map_view got mem in reserved area 0x81fe0000-0x81ff0000
000b:trace:virtual:VIRTUAL_DumpView View: 0x81fe0000 - 0x81feffff (valloc)
000b:trace:virtual:VIRTUAL_DumpView       0x81fe0000 - 0x81feffff --rw-
000b:Ret  KERNEL32.VirtualAlloc() retval=81fe0000 ret=6109c4be
000b:Call KERNEL32.VirtualFree(81fe0000,00000000,00008000) ret=6109c561
000b:trace:virtual:NtFreeVirtualMemory 0xffffffff 0x81fe0000 00000000 8000
000b:Ret  KERNEL32.VirtualFree() retval=00000001 ret=6109c561
000b:Call ntdll.NtCreateSection(0061c7b0,000f001f,0061c790,0061c7a8,00000080,08000000,000000cc) ret=6109a434
000b: create_mapping( access=000f001f, attributes=00000002, protect=0000004d, size=00000000, file_handle=00cc, objattr={rootdir=0000,sd={},name=L""} )
000b: create_mapping() = 0 { handle=00d4 }
000b:Ret  ntdll.NtCreateSection() retval=00000000 ret=6109a434
000b:Call ntdll.NtMapViewOfSection(000000d4,ffffffff,0061c7a4,00000000,00000007,0061c7a8,0061c7a0,00000001,40100000,00000080) ret=6109a539
000b:trace:virtual:NtMapViewOfSection handle=0xd4 process=0xffffffff addr=0x81fe0000 off=000000000 size=7 access=80
000b: get_mapping_info( handle=00d4, access=00000004 )
000b: get_mapping_info() = 0 { size=00001000, protect=77, header_size=0, base=00000000, entry=00000000, subsystem=0, major_subsystem=0, minor_subsystem=0, characteristics=0, dll_characteristics=0, machine=0, mapping=00d8, shared_file=0000 }
000b: get_handle_fd( handle=00d4 )
000b: *fd* 00d4 -> 153
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=000f001f, options=00000020 }
000b:trace:virtual:VIRTUAL_DumpView View: 0x81fe0000 - 0x81fe0fff (anonymous)
000b:trace:virtual:VIRTUAL_DumpView       0x81fe0000 - 0x81fe0fff c-rWx
000b:trace:virtual:NtMapViewOfSection handle=0xd4 size=1000 offset=000000000
000b:trace:virtual:map_file_into_view forcing exec permission on mapping 0x81fe0000-0x81fe0fff
000b:Ret  ntdll.NtMapViewOfSection() retval=00000000 ret=6109a539
000b:Call KERNEL32.VirtualProtect(81fe0000,00000007,00000008,0061c7e4) ret=6109a94e
000b:trace:virtual:NtProtectVirtualMemory 0xffffffff 0x81fe0000 00000007 00000008
000b:trace:virtual:VIRTUAL_SetProt 0x81fe0000-0x81fe0fff c-rW-
000b:trace:virtual:mprotect_exec forcing exec permission on 0x81fe0000-0x81fe0fff
000b:trace:virtual:VIRTUAL_DumpView View: 0x81fe0000 - 0x81fe0fff 0xd8
000b:trace:virtual:VIRTUAL_DumpView       0x81fe0000 - 0x81fe0fff c-rW-
000b:Ret  KERNEL32.VirtualProtect() retval=00000001 ret=6109a94e
000b:Call ntdll.NtCreateSection(0061c7a0,000f001f,0061c780,0061c798,00000080,08000000,00000000) ret=6109a31f
000b: create_mapping( access=000f001f, attributes=00000002, protect=0000004d, size=0000f000, file_handle=0000, objattr={rootdir=0000,sd={},name=L""} )
000b: create_mapping() = 0 { handle=00dc }
000b:Ret  ntdll.NtCreateSection() retval=00000000 ret=6109a31f
000b:Call ntdll.NtMapViewOfSection(000000dc,ffffffff,0061c794,00000000,0000f000,0061c798,0061c790,00000001,40100000,00000080) ret=6109a539
000b:trace:virtual:NtMapViewOfSection handle=0xdc process=0xffffffff addr=0x81fe1000 off=000000000 size=f000 access=80
000b: get_mapping_info( handle=00dc, access=00000004 )
000b: get_mapping_info() = 0 { size=0000f000, protect=77, header_size=0, base=00000000, entry=00000000, subsystem=0, major_subsystem=0, minor_subsystem=0, characteristics=0, dll_characteristics=0, machine=0, mapping=00e0, shared_file=0000 }
000b: get_handle_fd( handle=00dc )
000b: *fd* 00dc -> 154
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=000f001f, options=00000020 }
000b:trace:virtual:VIRTUAL_DumpView View: 0x81fe1000 - 0x81feffff (anonymous)
000b:trace:virtual:VIRTUAL_DumpView       0x81fe1000 - 0x81feffff c-rWx
000b:trace:virtual:NtMapViewOfSection handle=0xdc size=f000 offset=000000000
000b:trace:virtual:map_file_into_view forcing exec permission on mapping 0x81fe1000-0x81feffff
000b:Ret  ntdll.NtMapViewOfSection() retval=00000000 ret=6109a539
000b:Call KERNEL32.VirtualProtect(81fe1000,0000f000,00000008,0061c7e4) ret=6109a94e
000b:trace:virtual:NtProtectVirtualMemory 0xffffffff 0x81fe1000 0000f000 00000008
000b:trace:virtual:VIRTUAL_SetProt 0x81fe1000-0x81feffff c-rW-
000b:trace:virtual:mprotect_exec forcing exec permission on 0x81fe1000-0x81feffff
000b:trace:virtual:VIRTUAL_DumpView View: 0x81fe1000 - 0x81feffff 0xe0
000b:trace:virtual:VIRTUAL_DumpView       0x81fe1000 - 0x81feffff c-rW-
000b:Ret  KERNEL32.VirtualProtect() retval=00000001 ret=6109a94e
000b:Call ntdll.NtClose(000000cc) ret=6109c81b
000b: close_handle( handle=00cc )
000b: close_handle() = 0
000b:Ret  ntdll.NtClose() retval=00000000 ret=6109c81b
000b:Call KERNEL32.WaitForSingleObject(0000016c,00000064) ret=61077b89
000b: select( flags=2, cookie=0061c13c, timeout=+0.1000000, prev_apc=0000, result={}, data={WAIT,handles={016c}} )
000b: select() = 0 { timeout=1d0d675a314e300 (+0.1000000), call={APC_NONE}, apc_handle=0000 }
000b:Ret  KERNEL32.WaitForSingleObject() retval=00000000 ret=61077b89
000b:Call KERNEL32.ReleaseMutex(0000016c) ret=61077bf3
000b: release_mutex( handle=016c )
000b: release_mutex() = 0 { prev_count=00000001 }
000b:Ret  KERNEL32.ReleaseMutex() retval=00000001 ret=61077bf3
000b:Call KERNEL32.WriteFile(00000184,0061c63f,00000008,0061c740,00000000) ret=6107dad9
000b:trace:file:WriteFile 0x184 0x61c63f 8 0x61c740 (nil)
000b:trace:ntdll:NtWriteFile (0x184,(nil),(nil),(nil),0x61c588,0x61c63f,0x00000008,(nil),(nil))!
000b:trace:ntdll:NtWriteFile = SUCCESS (8)
000b:Ret  KERNEL32.WriteFile() retval=00000001 ret=6107dad9
000b:Call KERNEL32.WaitForSingleObject(0000016c,00000064) ret=61077b89
000b: select( flags=2, cookie=0061c13c, timeout=+0.1000000, prev_apc=0000, result={}, data={WAIT,handles={016c}} )
000b: select() = 0 { timeout=1d0d675a314e936 (+0.1000000), call={APC_NONE}, apc_handle=0000 }
000b:Ret  KERNEL32.WaitForSingleObject() retval=00000000 ret=61077b89
000b:Call KERNEL32.ReleaseMutex(0000016c) ret=61077bf3
000b: release_mutex( handle=016c )
000b: release_mutex() = 0 { prev_count=00000001 }
000b:Ret  KERNEL32.ReleaseMutex() retval=00000001 ret=61077bf3
000b:Call KERNEL32.WriteFile(00000184,0061c63f,00000002,0061c740,00000000) ret=6107dad9
000b:trace:file:WriteFile 0x184 0x61c63f 2 0x61c740 (nil)
000b:trace:ntdll:NtWriteFile (0x184,(nil),(nil),(nil),0x61c588,0x61c63f,0x00000002,(nil),(nil))!
000b:trace:ntdll:NtWriteFile = SUCCESS (2)
000b:Ret  KERNEL32.WriteFile() retval=00000001 ret=6107dad9
000b:Call ntdll.NtCreateEvent(0061c644,001f0003,0061c624,00000001,00000000) ret=6108d6a7
000b: create_event( access=001f0003, attributes=00000000, manual_reset=0, initial_state=0, objattr={rootdir=0000,sd={},name=L""} )
000b: create_event() = 0 { handle=00cc }
000b:Ret  ntdll.NtCreateEvent() retval=00000000 ret=6108d6a7
000b:Call ntdll.NtCreateFile(0061b5a8,00020088,0061b588,0061b580,00000000,00000000,00000007,00000001,00204000,611aea20,00000018) ret=610bd36b
000b:trace:ntdll:FILE_CreateFile handle=0x61b5a8 access=00020088 name=L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" objattr=00000000 root=(nil) sec=(nil) io=0x61b580 alloc_size=(nil) attr=00000000 sharing=00000007 disp=1 options=00204000 ea=0x611aea20.0x00000018
000b:trace:file:wine_nt_to_unix_file_name L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" -> "/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file"
000b: create_file( access=00020088, attributes=00000000, sharing=00000007, create=1, options=00204000, attrs=00000000, objattr={rootdir=0000,sd={},name=L""}, filename="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" )
000b: create_file() = 0 { handle=00e4 }
000b:Ret  ntdll.NtCreateFile() retval=00000000 ret=610bd36b
000b: get_handle_fd( handle=00e4 )
000b: *fd* 00e4 -> 150
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=00020088, options=00204000 }
000b: get_handle_unix_name( handle=00e4 )
000b: get_handle_unix_name() = 0 { name_len=77, name="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" }
000b:Call ntdll.NtClose(000000e4) ret=610bdf56
000b: close_handle( handle=00e4 )
000b: close_handle() = 0
000b:Ret  ntdll.NtClose() retval=00000000 ret=610bdf56
000b:Call KERNEL32.DuplicateHandle(ffffffff,00000000,ffffffff,612f8804,00000000,00000001,00000002) ret=611a39fd
000b: dup_handle( src_process=ffffffff, src_handle=0000, dst_process=ffffffff, access=00000000, attributes=00000002, options=00000002 )
000b: dup_handle() = INVALID_HANDLE { handle=0000, self=1, closed=0 }
000b:Ret  KERNEL32.DuplicateHandle() retval=00000000 ret=611a39fd
000b:Call ntdll.NtCreateFile(0061c838,40120080,0061c820,0061c818,00000000,00000080,00000007,00000003,00004020,00000000,00000000) ret=61042125
000b:trace:ntdll:FILE_CreateFile handle=0x61c838 access=40120080 name=L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" objattr=00000002 root=(nil) sec=(nil) io=0x61c818 alloc_size=(nil) attr=00000080 sharing=00000007 disp=3 options=00004020 ea=(nil).0x00000000
000b:trace:file:wine_nt_to_unix_file_name L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" -> "/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file"
000b: create_file( access=40120080, attributes=00000002, sharing=00000007, create=3, options=00004020, attrs=00000080, objattr={rootdir=0000,sd={},name=L""}, filename="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" )
000b: create_file() = 0 { handle=00e4 }
000b:Ret  ntdll.NtCreateFile() retval=00000000 ret=61042125
000b:Call ntdll.NtSetInformationFile(000000e4,0061c818,0061c810,00000008,00000014) ret=61042292
000b:trace:ntdll:NtSetInformationFile (0xe4,0x61c818,0x61c810,0x00000008,0x00000014)
000b: get_handle_fd( handle=00e4 )
000b: *fd* 00e4 -> 150
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=00120196, options=00004020 }
000b:Ret  ntdll.NtSetInformationFile() retval=00000000 ret=61042292

attachment#2

#########################
#fopen(file,&fd);       #
#########################
000b:Call ntdll.NtCreateFile(0061b598,00020088,0061b578,0061b570,00000000,00000000,00000007,00000001,00204000,611aea20,00000018) ret=610bd36b
000b:trace:ntdll:FILE_CreateFile handle=0x61b598 access=00020088 name=L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" objattr=00000000 root=(nil) sec=(nil) io=0x61b570 alloc_size=(nil) attr=00000000 sharing=00000007 disp=1 options=00204000 ea=0x611aea20.0x00000018
000b:trace:file:wine_nt_to_unix_file_name L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" -> "/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file"
000b: create_file( access=00020088, attributes=00000000, sharing=00000007, create=1, options=00204000, attrs=00000000, objattr={rootdir=0000,sd={},name=L""}, filename="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" )
000b: create_file() = 0 { handle=00c4 }
000b:Ret  ntdll.NtCreateFile() retval=00000000 ret=610bd36b
000b: get_handle_fd( handle=00c4 )
000b: *fd* 00c4 -> 138
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=00020088, options=00204000 }
000b: get_handle_unix_name( handle=00c4 )
000b: get_handle_unix_name() = 0 { name_len=77, name="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" }
000b:Call ntdll.NtClose(000000c4) ret=610bdf56
000b: close_handle( handle=00c4 )
000b: close_handle() = 0
000b:Ret  ntdll.NtClose() retval=00000000 ret=610bdf56
000b:Call KERNEL32.DuplicateHandle(ffffffff,00000000,ffffffff,612fb360,00000000,00000001,00000002) ret=611a39fd
000b: dup_handle( src_process=ffffffff, src_handle=0000, dst_process=ffffffff, access=00000000, attributes=00000002, options=00000002 )
000b: dup_handle() = INVALID_HANDLE { handle=0000, self=1, closed=0 }
000b:Ret  KERNEL32.DuplicateHandle() retval=00000000 ret=611a39fd
################################
# fstat(fd,&buf)               #
################################
000b:Call ntdll.NtCreateFile(0061c828,80100000,0061c810,0061c808,00000000,00000000,00000007,00000001,00004020,00000000,00000000) ret=61042125
000b:trace:ntdll:FILE_CreateFile handle=0x61c828 access=80100000 name=L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" objattr=00000002 root=(nil) sec=(nil) io=0x61c808 alloc_size=(nil) attr=00000000 sharing=00000007 disp=1 options=00004020 ea=(nil).0x00000000
000b:trace:file:wine_nt_to_unix_file_name L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" -> "/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file"
000b: create_file( access=80100000, attributes=00000002, sharing=00000007, create=1, options=00004020, attrs=00000000, objattr={rootdir=0000,sd={},name=L""}, filename="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" )
000b: create_file() = 0 { handle=00c4 }
000b:Ret  ntdll.NtCreateFile() retval=00000000 ret=61042125
000b: get_handle_fd( handle=00c4 )
000b: *fd* 00c4 -> 138
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=00120089, options=00004020 }
000b:Call ntdll.NtAllocateLocallyUniqueId(612fb2b8) ret=6119fe18
000b:trace:ntdll:NtAllocateLocallyUniqueId 0x612fb2b8
000b: allocate_locally_unique_id( )
000b: allocate_locally_unique_id() = 0 { luid=0.1307 }
000b:Ret  ntdll.NtAllocateLocallyUniqueId() retval=00000000 ret=6119fe18
000b: get_handle_unix_name( handle=00c4 )
000b: get_handle_unix_name() = 0 { name_len=77, name="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" }
000b:Call ntdll.NtOpenFile(0061c8c4,00100001,0061c8ac,0061c8a4,00000007,00004020) ret=6104e456
000b:trace:ntdll:FILE_CreateFile handle=0x61c8c4 access=00100001 name=L"" objattr=00000000 root=0xc4 sec=(nil) io=0x61c8a4 alloc_size=(nil) attr=00000000 sharing=00000007 disp=1 options=00004020 ea=(nil).0x00000000
000b:trace:file:nt_to_unix_file_name_attr L"" not found in .
000b: open_file_object( access=00100001, attributes=00000000, rootdir=00c4, sharing=00000007, options=00004020, filename=L"" )
000b: open_file_object() = 0 { handle=00c8 }
000b: get_handle_fd( handle=00c8 )
000b: *fd* 00c8 -> 150
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=00100001, options=00004020 }
000b:Ret  ntdll.NtOpenFile() retval=00000000 ret=6104e456
000b:Call ntdll.NtReadFile(000000c8,00000000,00000000,00000000,0061c8a4,0061c895,00000003,0061c898,00000000) ret=6104e50e
000b:trace:ntdll:NtReadFile (0xc8,(nil),(nil),(nil),0x61c8a4,0x61c895,0x00000003,0x61c898,(nil)),partial stub!
000b:trace:ntdll:NtReadFile = SUCCESS (3)
000b:Ret  ntdll.NtReadFile() retval=00000000 ret=6104e50e
000b:Call ntdll.NtClose(000000c8) ret=6104e5b1
000b: close_handle( handle=00c8 )
000b: close_handle() = 0
000b:Ret  ntdll.NtClose() retval=00000000 ret=6104e5b1
############################
# mmap(*args);             #
############################
000b:Call ntdll.NtCreateEvent(0061c374,001f0003,0061c354,00000001,00000000) ret=6108d6a7
000b: create_event( access=001f0003, attributes=00000000, manual_reset=0, initial_state=0, objattr={rootdir=0000,sd={},name=L""} )
000b: create_event() = 0 { handle=00c8 }
000b:Ret  ntdll.NtCreateEvent() retval=00000000 ret=6108d6a7
000b:Call KERNEL32.GetSystemTimeAsFileTime(0061c470) ret=611195f2
000b:Ret  KERNEL32.GetSystemTimeAsFileTime() retval=01d0d675 ret=611195f2
000b: get_security_object( handle=0174, security_info=00000007 )
000b: get_security_object() = 0 { sd_len=000000c8, sd={control=00001014,owner={S-1-5-21-0-0-0-1000},group={S-1-5-21-0-0-0-513},sacl={},dacl={{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=1f019f,AceFlags=0,Sid={S-1-5-21-0-0-0-1000}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=120196,AceFlags=0,Sid={S-1-5-21-0-0-0-513}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=1f0000,AceFlags=0,Sid={S-1-5-32-544}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=120080,AceFlags=0,Sid={S-1-1-0}}}} }
000b: get_security_object( handle=0174, security_info=00000007 )
000b: get_security_object() = 0 { sd_len=000000c8, sd={control=00001014,owner={S-1-5-21-0-0-0-1000},group={S-1-5-21-0-0-0-513},sacl={},dacl={{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=1f019f,AceFlags=0,Sid={S-1-5-21-0-0-0-1000}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=120196,AceFlags=0,Sid={S-1-5-21-0-0-0-513}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=1f0000,AceFlags=0,Sid={S-1-5-32-544}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=120080,AceFlags=0,Sid={S-1-1-0}}}} }
000b:Call ntdll.NtCreateFile(0061b278,00020088,0061b258,0061b250,00000000,00000000,00000007,00000001,00204000,611aea20,00000018) ret=610bd36b
000b:trace:ntdll:FILE_CreateFile handle=0x61b278 access=00020088 name=L"\\??\\C:\\msys32\\dev" objattr=00000000 root=(nil) sec=(nil) io=0x61b250 alloc_size=(nil) attr=00000000 sharing=00000007 disp=1 options=00204000 ea=0x611aea20.0x00000018
000b:trace:file:wine_nt_to_unix_file_name L"\\??\\C:\\msys32\\dev" -> "/home/void001/.wine/dosdevices/c:/msys32/dev"
000b: create_file( access=00020088, attributes=00000000, sharing=00000007, create=1, options=00204000, attrs=00000000, objattr={rootdir=0000,sd={},name=L""}, filename="/home/void001/.wine/dosdevices/c:/msys32/dev" )
000b: create_file() = 0 { handle=00cc }
000b:Ret  ntdll.NtCreateFile() retval=00000000 ret=610bd36b
000b: get_handle_fd( handle=00cc )
000b: *fd* 00cc -> 150
000b: get_handle_fd() = 0 { type=2, cacheable=1, access=00020088, options=00204000 }
000b: get_handle_unix_name( handle=00cc )
000b: get_handle_unix_name() = 0 { name_len=44, name="/home/void001/.wine/dosdevices/c:/msys32/dev" }
000b:Call KERNEL32.DuplicateHandle(ffffffff,000000cc,ffffffff,612f8804,00000000,00000001,00000002) ret=611a39fd
000b: dup_handle( src_process=ffffffff, src_handle=00cc, dst_process=ffffffff, access=00000000, attributes=00000002, options=00000002 )
000b: dup_handle() = 0 { handle=00d0, self=1, closed=0 }
000b:Ret  KERNEL32.DuplicateHandle() retval=00000001 ret=611a39fd
000b: get_handle_fd( handle=00d0 )
000b: *fd* 00d0 -> 150
000b: get_handle_fd() = 0 { type=2, cacheable=1, access=00020088, options=00204000 }
000b:Call KERNEL32.CloseHandle(000000d0) ret=611a3a54
000b: close_handle( handle=00d0 )
000b: close_handle() = 0
000b:Ret  KERNEL32.CloseHandle() retval=00000001 ret=611a3a54
000b:Call KERNEL32.CloseHandle(000000cc) ret=611a3a54
000b: close_handle( handle=00cc )
000b: close_handle() = 0
000b:Ret  KERNEL32.CloseHandle() retval=00000001 ret=611a3a54
000b:Call KERNEL32.VirtualAlloc(20040000,00010000,00001000,00000004) ret=6108ba74
000b:trace:virtual:NtAllocateVirtualMemory 0xffffffff 0x20040000 00010000 1000 00000004
000b:trace:virtual:VIRTUAL_SetProt 0x20040000-0x2004ffff c-rw-
000b:trace:virtual:mprotect_exec forcing exec permission on 0x20040000-0x2004ffff
000b:trace:virtual:VIRTUAL_DumpView View: 0x20000000 - 0x37ffffff (valloc)
000b:trace:virtual:VIRTUAL_DumpView       0x20000000 - 0x2004ffff c-rw-
000b:trace:virtual:VIRTUAL_DumpView       0x20050000 - 0x37ffffff -----
000b:Ret  KERNEL32.VirtualAlloc() retval=20040000 ret=6108ba74
000b:Call KERNEL32.WaitForSingleObject(0000016c,00000064) ret=61077b89
000b: select( flags=2, cookie=0061bdfc, timeout=+0.1000000, prev_apc=0000, result={}, data={WAIT,handles={016c}} )
000b: select() = 0 { timeout=1d0d675a314b614 (+0.1000000), call={APC_NONE}, apc_handle=0000 }
000b:Ret  KERNEL32.WaitForSingleObject() retval=00000000 ret=61077b89
000b:Call KERNEL32.ReleaseMutex(0000016c) ret=61077bf3
000b: release_mutex( handle=016c )
000b: release_mutex() = 0 { prev_count=00000001 }
000b:Ret  KERNEL32.ReleaseMutex() retval=00000001 ret=61077bf3
000b:Call KERNEL32.WriteFile(00000184,0061c2ff,0000000e,0061c400,00000000) ret=6107dad9
000b:trace:file:WriteFile 0x184 0x61c2ff 14 0x61c400 (nil)
000b:trace:ntdll:NtWriteFile (0x184,(nil),(nil),(nil),0x61c248,0x61c2ff,0x0000000e,(nil),(nil))!
000b: get_handle_fd( handle=0184 )
000b: *fd* 0184 -> 116
000b: get_handle_fd() = 0 { type=5, cacheable=1, access=00120196, options=00000060 }
000b:trace:ntdll:NtWriteFile = SUCCESS (14)
000b:Ret  KERNEL32.WriteFile() retval=00000001 ret=6107dad9
000b:Call ntdll.NtOpenFile(0061c974,a0100000,0061c978,0061c96c,00000007,00004020) ret=6109c098
000b:trace:ntdll:FILE_CreateFile handle=0x61c974 access=a0100000 name=L"" objattr=00000000 root=0xc4 sec=(nil) io=0x61c96c alloc_size=(nil) attr=00000000 sharing=00000007 disp=1 options=00004020 ea=(nil).0x00000000
000b:trace:file:nt_to_unix_file_name_attr L"" not found in .
000b: open_file_object( access=a0100000, attributes=00000000, rootdir=00c4, sharing=00000007, options=00004020, filename=L"" )
000b: open_file_object() = 0 { handle=00cc }
000b: get_handle_fd( handle=00cc )
000b: *fd* 00cc -> 150
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=001200a9, options=00004020 }
000b:Ret  ntdll.NtOpenFile() retval=00000000 ret=6109c098
000b:Call KERNEL32.DuplicateHandle(ffffffff,00000000,ffffffff,612f8804,00000000,00000001,00000002) ret=611a39fd
000b: dup_handle( src_process=ffffffff, src_handle=0000, dst_process=ffffffff, access=00000000, attributes=00000002, options=00000002 )
000b: dup_handle() = INVALID_HANDLE { handle=0000, self=1, closed=0 }
000b:Ret  KERNEL32.DuplicateHandle() retval=00000000 ret=611a39fd
000b: get_handle_unix_name( handle=00cc )
000b: get_handle_unix_name() = 0 { name_len=77, name="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" }
000b:Call ntdll.NtOpenFile(0061c7c4,00100001,0061c7ac,0061c7a4,00000007,00004020) ret=6104e456
000b:trace:ntdll:FILE_CreateFile handle=0x61c7c4 access=00100001 name=L"" objattr=00000000 root=0xcc sec=(nil) io=0x61c7a4 alloc_size=(nil) attr=00000000 sharing=00000007 disp=1 options=00004020 ea=(nil).0x00000000
000b:trace:file:nt_to_unix_file_name_attr L"" not found in .
000b: open_file_object( access=00100001, attributes=00000000, rootdir=00cc, sharing=00000007, options=00004020, filename=L"" )
000b: open_file_object() = 0 { handle=00d0 }
000b: get_handle_fd( handle=00d0 )
000b: *fd* 00d0 -> 153
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=00100001, options=00004020 }
000b:Ret  ntdll.NtOpenFile() retval=00000000 ret=6104e456
000b:Call ntdll.NtReadFile(000000d0,00000000,00000000,00000000,0061c7a4,0061c795,00000003,0061c798,00000000) ret=6104e50e
000b:trace:ntdll:NtReadFile (0xd0,(nil),(nil),(nil),0x61c7a4,0x61c795,0x00000003,0x61c798,(nil)),partial stub!
000b:trace:ntdll:NtReadFile = SUCCESS (3)
000b:Ret  ntdll.NtReadFile() retval=00000000 ret=6104e50e
000b:Call ntdll.NtClose(000000d0) ret=6104e5b1
000b: close_handle( handle=00d0 )
000b: close_handle() = 0
000b:Ret  ntdll.NtClose() retval=00000000 ret=6104e5b1
000b:Call ntdll.NtCreateEvent(0061c644,001f0003,0061c624,00000001,00000000) ret=6108d6a7
000b: create_event( access=001f0003, attributes=00000000, manual_reset=0, initial_state=0, objattr={rootdir=0000,sd={},name=L""} )
000b: create_event() = 0 { handle=00d0 }
000b:Ret  ntdll.NtCreateEvent() retval=00000000 ret=6108d6a7
000b:Call KERNEL32.VirtualAlloc(00000000,00010000,00102000,00000004) ret=6109c4be
000b:trace:virtual:NtAllocateVirtualMemory 0xffffffff (nil) 00010000 102000 00000004
000b:trace:virtual:map_view got mem in reserved area 0x81fe0000-0x81ff0000
000b:trace:virtual:VIRTUAL_DumpView View: 0x81fe0000 - 0x81feffff (valloc)
000b:trace:virtual:VIRTUAL_DumpView       0x81fe0000 - 0x81feffff --rw-
000b:Ret  KERNEL32.VirtualAlloc() retval=81fe0000 ret=6109c4be
000b:Call KERNEL32.VirtualFree(81fe0000,00000000,00008000) ret=6109c561
000b:trace:virtual:NtFreeVirtualMemory 0xffffffff 0x81fe0000 00000000 8000
000b:Ret  KERNEL32.VirtualFree() retval=00000001 ret=6109c561
000b:Call ntdll.NtCreateSection(0061c7b0,000f001f,0061c790,0061c7a8,00000080,08000000,000000cc) ret=6109a434
000b: create_mapping( access=000f001f, attributes=00000002, protect=0000004d, size=00000000, file_handle=00cc, objattr={rootdir=0000,sd={},name=L""} )
000b: create_mapping() = 0 { handle=00d4 }
000b:Ret  ntdll.NtCreateSection() retval=00000000 ret=6109a434
000b:Call ntdll.NtMapViewOfSection(000000d4,ffffffff,0061c7a4,00000000,00000007,0061c7a8,0061c7a0,00000001,40100000,00000080) ret=6109a539
000b:trace:virtual:NtMapViewOfSection handle=0xd4 process=0xffffffff addr=0x81fe0000 off=000000000 size=7 access=80
000b: get_mapping_info( handle=00d4, access=00000004 )
000b: get_mapping_info() = 0 { size=00001000, protect=77, header_size=0, base=00000000, entry=00000000, subsystem=0, major_subsystem=0, minor_subsystem=0, characteristics=0, dll_characteristics=0, machine=0, mapping=00d8, shared_file=0000 }
000b: get_handle_fd( handle=00d4 )
000b: *fd* 00d4 -> 153
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=000f001f, options=00000020 }
000b:trace:virtual:VIRTUAL_DumpView View: 0x81fe0000 - 0x81fe0fff (anonymous)
000b:trace:virtual:VIRTUAL_DumpView       0x81fe0000 - 0x81fe0fff c-rWx
000b:trace:virtual:NtMapViewOfSection handle=0xd4 size=1000 offset=000000000
000b:trace:virtual:map_file_into_view forcing exec permission on mapping 0x81fe0000-0x81fe0fff
000b:Ret  ntdll.NtMapViewOfSection() retval=00000000 ret=6109a539
000b:Call KERNEL32.VirtualProtect(81fe0000,00000007,00000008,0061c7e4) ret=6109a94e
000b:trace:virtual:NtProtectVirtualMemory 0xffffffff 0x81fe0000 00000007 00000008
000b:trace:virtual:VIRTUAL_SetProt 0x81fe0000-0x81fe0fff c-rW-
000b:trace:virtual:mprotect_exec forcing exec permission on 0x81fe0000-0x81fe0fff
000b:trace:virtual:VIRTUAL_DumpView View: 0x81fe0000 - 0x81fe0fff 0xd8
000b:trace:virtual:VIRTUAL_DumpView       0x81fe0000 - 0x81fe0fff c-rW-
000b:Ret  KERNEL32.VirtualProtect() retval=00000001 ret=6109a94e
000b:Call ntdll.NtCreateSection(0061c7a0,000f001f,0061c780,0061c798,00000080,08000000,00000000) ret=6109a31f
000b: create_mapping( access=000f001f, attributes=00000002, protect=0000004d, size=0000f000, file_handle=0000, objattr={rootdir=0000,sd={},name=L""} )
000b: create_mapping() = 0 { handle=00dc }
000b:Ret  ntdll.NtCreateSection() retval=00000000 ret=6109a31f
000b:Call ntdll.NtMapViewOfSection(000000dc,ffffffff,0061c794,00000000,0000f000,0061c798,0061c790,00000001,40100000,00000080) ret=6109a539
000b:trace:virtual:NtMapViewOfSection handle=0xdc process=0xffffffff addr=0x81fe1000 off=000000000 size=f000 access=80
000b: get_mapping_info( handle=00dc, access=00000004 )
000b: get_mapping_info() = 0 { size=0000f000, protect=77, header_size=0, base=00000000, entry=00000000, subsystem=0, major_subsystem=0, minor_subsystem=0, characteristics=0, dll_characteristics=0, machine=0, mapping=00e0, shared_file=0000 }
000b: get_handle_fd( handle=00dc )
000b: *fd* 00dc -> 154
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=000f001f, options=00000020 }
000b:trace:virtual:VIRTUAL_DumpView View: 0x81fe1000 - 0x81feffff (anonymous)
000b:trace:virtual:VIRTUAL_DumpView       0x81fe1000 - 0x81feffff c-rWx
000b:trace:virtual:NtMapViewOfSection handle=0xdc size=f000 offset=000000000
000b:trace:virtual:map_file_into_view forcing exec permission on mapping 0x81fe1000-0x81feffff
000b:Ret  ntdll.NtMapViewOfSection() retval=00000000 ret=6109a539
000b:Call KERNEL32.VirtualProtect(81fe1000,0000f000,00000008,0061c7e4) ret=6109a94e
000b:trace:virtual:NtProtectVirtualMemory 0xffffffff 0x81fe1000 0000f000 00000008
000b:trace:virtual:VIRTUAL_SetProt 0x81fe1000-0x81feffff c-rW-
000b:trace:virtual:mprotect_exec forcing exec permission on 0x81fe1000-0x81feffff
000b:trace:virtual:VIRTUAL_DumpView View: 0x81fe1000 - 0x81feffff 0xe0
000b:trace:virtual:VIRTUAL_DumpView       0x81fe1000 - 0x81feffff c-rW-
000b:Ret  KERNEL32.VirtualProtect() retval=00000001 ret=6109a94e
000b:Call ntdll.NtClose(000000cc) ret=6109c81b
000b: close_handle( handle=00cc )
000b: close_handle() = 0
000b:Ret  ntdll.NtClose() retval=00000000 ret=6109c81b
000b:Call KERNEL32.WaitForSingleObject(0000016c,00000064) ret=61077b89
000b: select( flags=2, cookie=0061c13c, timeout=+0.1000000, prev_apc=0000, result={}, data={WAIT,handles={016c}} )
000b: select() = 0 { timeout=1d0d675a314e300 (+0.1000000), call={APC_NONE}, apc_handle=0000 }
000b:Ret  KERNEL32.WaitForSingleObject() retval=00000000 ret=61077b89
000b:Call KERNEL32.ReleaseMutex(0000016c) ret=61077bf3
000b: release_mutex( handle=016c )
000b: release_mutex() = 0 { prev_count=00000001 }
000b:Ret  KERNEL32.ReleaseMutex() retval=00000001 ret=61077bf3
000b:Call KERNEL32.WriteFile(00000184,0061c63f,00000008,0061c740,00000000) ret=6107dad9
000b:trace:file:WriteFile 0x184 0x61c63f 8 0x61c740 (nil)
000b:trace:ntdll:NtWriteFile (0x184,(nil),(nil),(nil),0x61c588,0x61c63f,0x00000008,(nil),(nil))!
000b:trace:ntdll:NtWriteFile = SUCCESS (8)
000b:Ret  KERNEL32.WriteFile() retval=00000001 ret=6107dad9
000b:Call KERNEL32.WaitForSingleObject(0000016c,00000064) ret=61077b89
000b: select( flags=2, cookie=0061c13c, timeout=+0.1000000, prev_apc=0000, result={}, data={WAIT,handles={016c}} )
000b: select() = 0 { timeout=1d0d675a314e936 (+0.1000000), call={APC_NONE}, apc_handle=0000 }
000b:Ret  KERNEL32.WaitForSingleObject() retval=00000000 ret=61077b89
000b:Call KERNEL32.ReleaseMutex(0000016c) ret=61077bf3
000b: release_mutex( handle=016c )
000b: release_mutex() = 0 { prev_count=00000001 }
000b:Ret  KERNEL32.ReleaseMutex() retval=00000001 ret=61077bf3
000b:Call KERNEL32.WriteFile(00000184,0061c63f,00000002,0061c740,00000000) ret=6107dad9
000b:trace:file:WriteFile 0x184 0x61c63f 2 0x61c740 (nil)
000b:trace:ntdll:NtWriteFile (0x184,(nil),(nil),(nil),0x61c588,0x61c63f,0x00000002,(nil),(nil))!
000b:trace:ntdll:NtWriteFile = SUCCESS (2)
000b:Ret  KERNEL32.WriteFile() retval=00000001 ret=6107dad9
000b:Call ntdll.NtCreateEvent(0061c644,001f0003,0061c624,00000001,00000000) ret=6108d6a7
000b: create_event( access=001f0003, attributes=00000000, manual_reset=0, initial_state=0, objattr={rootdir=0000,sd={},name=L""} )
000b: create_event() = 0 { handle=00cc }
000b:Ret  ntdll.NtCreateEvent() retval=00000000 ret=6108d6a7

##############################
#FILE* fp = fopen(file,"wb");#
##############################
000b:Call ntdll.NtCreateFile(0061b5a8,00020088,0061b588,0061b580,00000000,00000000,00000007,00000001,00204000,611aea20,00000018) ret=610bd36b
000b:trace:ntdll:FILE_CreateFile handle=0x61b5a8 access=00020088 name=L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" objattr=00000000 root=(nil) sec=(nil) io=0x61b580 alloc_size=(nil) attr=00000000 sharing=00000007 disp=1 options=00204000 ea=0x611aea20.0x00000018
000b:trace:file:wine_nt_to_unix_file_name L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" -> "/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file"
000b: create_file( access=00020088, attributes=00000000, sharing=00000007, create=1, options=00204000, attrs=00000000, objattr={rootdir=0000,sd={},name=L""}, filename="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" )
000b: create_file() = 0 { handle=00e4 }
000b:Ret  ntdll.NtCreateFile() retval=00000000 ret=610bd36b
000b: get_handle_fd( handle=00e4 )
000b: *fd* 00e4 -> 150
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=00020088, options=00204000 }
000b: get_handle_unix_name( handle=00e4 )
000b: get_handle_unix_name() = 0 { name_len=77, name="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" }
000b:Call ntdll.NtClose(000000e4) ret=610bdf56
000b: close_handle( handle=00e4 )
000b: close_handle() = 0
000b:Ret  ntdll.NtClose() retval=00000000 ret=610bdf56
000b:Call KERNEL32.DuplicateHandle(ffffffff,00000000,ffffffff,612f8804,00000000,00000001,00000002) ret=611a39fd
000b: dup_handle( src_process=ffffffff, src_handle=0000, dst_process=ffffffff, access=00000000, attributes=00000002, options=00000002 )
000b: dup_handle() = INVALID_HANDLE { handle=0000, self=1, closed=0 }
000b:Ret  KERNEL32.DuplicateHandle() retval=00000000 ret=611a39fd
000b:Call ntdll.NtCreateFile(0061c838,40120080,0061c820,0061c818,00000000,00000080,00000007,00000003,00004020,00000000,00000000) ret=61042125
000b:trace:ntdll:FILE_CreateFile handle=0x61c838 access=40120080 name=L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" objattr=00000002 root=(nil) sec=(nil) io=0x61c818 alloc_size=(nil) attr=00000080 sharing=00000007 disp=3 options=00004020 ea=(nil).0x00000000
000b:trace:file:wine_nt_to_unix_file_name L"\\??\\C:\\msys32\\home\\void001\\bug471_replay\\test.file" -> "/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file"
000b: create_file( access=40120080, attributes=00000002, sharing=00000007, create=3, options=00004020, attrs=00000080, objattr={rootdir=0000,sd={},name=L""}, filename="/home/void001/.wine/dosdevices/c:/msys32/home/void001/bug471_replay/test.file" )
000b: create_file() = 0 { handle=00e4 }
000b:Ret  ntdll.NtCreateFile() retval=00000000 ret=61042125
000b:Call ntdll.NtSetInformationFile(000000e4,0061c818,0061c810,00000008,00000014) ret=61042292
000b:trace:ntdll:NtSetInformationFile (0xe4,0x61c818,0x61c810,0x00000008,0x00000014)
000b: get_handle_fd( handle=00e4 )
000b: *fd* 00e4 -> 150
000b: get_handle_fd() = 0 { type=1, cacheable=1, access=00120196, options=00004020 }
000b:Ret  ntdll.NtSetInformationFile() retval=00000000 ret=61042292

attachment#3


NtCreateFile()
NtQueryInformationFile()
NtCreateSection()
NtMapViewOfSection()
NtCreateFile()
NtSetInformationFile(FileEndOfFileInformation)

  • Future plan: After the test case is done , We need to start to fix the bug ~ XD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment