From wine.msi@hidden Mon Dec 1 00:01:39 2008 From: wine.msi@hidden (Mike McCormack) Date: Mon Dec 1 01:01:46 2008 Subject: ring3k-0.0.13 is available Message-ID: <392fb48f0811301601u77e0c498q7125b3a606d30ae2@mail.gmail.com> Hi! ring3k-0.0.13 is now available with: * Initial graphics backend (pixel and simple rectangle drawing) * shared memory access tracing to aid debugging * window creation in the works... http://ring3k.org/ring3k-0.0.13.tar.gz thanks, Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.infowares.com/archive/ring3k/attachments/20081201/91c199b0/attachment.htm From wine.msi@hidden Sat Dec 6 00:50:34 2008 From: wine.msi@hidden (Mike McCormack) Date: Sat Dec 6 01:50:48 2008 Subject: Announcing ring3k-0.0.14.tar.gz Message-ID: <392fb48f0812051650m327270cdv9d727d49f33597c7@mail.gmail.com> Hi All, ring3k version 0.0.14 is up at http://ring3k.org/ring3k-0.0.14.tar.gz This release is aimed at making things a bit easier for people trying out ring3k. The root of the source directory is now the place to run tests and invoke ring3k from, and the script to invoke the loader is now called "ring3k". Additionally, I have removed the dependency on cabextract. I will be offline for sometime during December... thanks, Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.infowares.com/archive/ring3k/attachments/20081206/87cc410a/attachment.htm From bengen@hidden Thu Dec 11 09:46:31 2008 From: bengen@hidden (Hilko Bengen) Date: Mon Dec 15 21:56:24 2008 Subject: Fixes for compiling with g++ 4.3.2 Message-ID: <871vwfjdzs.fsf@msgid.hilluzination.de> Hi, when trying to get ring3k from git to compile on an i386 Debian/unstable box, I got the following error: ,---- | g++ -m32 -rdynamic -o ntl ptrace_if.o atom.o block.o completion.o debug.o driver.o event.o fiber.o file.o job.o kthread.o mailslot.o mem.o mutant.o namedpipe.o ntcall.o ntgdi.o ntl.o ntuser.o objdir.o object.o platform.o port.o profile.o process.o ptrace_base.o random.o reg.o section.o semaphore.o skas.o symlink.o syscall.o thread.o timer.o token.o tt.o unicode.o -lxml2 -lSDL -lstdc++ ../libudis86/libudis86.a | ntuser.o: In function `NtUserProcessConnect(void*, void*, unsigned long)': | ntuser.cpp:(.text+0x1db8): undefined reference to `long object_from_handle(process_t*&, void*, unsigned long)' | collect2: ld returned 1 exit status | make[1]: *** [ntl] Error 1 | make[1]: Leaving directory `/home/hbengen/tmp/ring3k/loader' | make: *** [loader_dir] Error 2 `---- I tried a few things without havnig much of a clue what I was doing. First I went to compile loader/ using older g++ versions. A patch for declaring CXX in the configure script is included below. (g++ 4.2 turned out to compile the code just fine.) Finally, I figured out that apparently all to get g++ 4.3 to compile the userspace loader was adding #include "object.inl" to loader/ntuser.cpp Cheers, -Hilko diff --git a/configure.ac b/configure.ac index f890212..ffee715 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,8 @@ AC_INIT(ring3k,0.0.14) +AC_PROG_CC +AC_PROG_CXX AC_CONFIG_HEADERS([include/config.h]) AC_CHECK_HEADERS([asm/ptrace.h]) AC_CHECK_HEADERS([valgrind/valgrind.h]) diff --git a/loader/Makefile.in b/loader/Makefile.in index 26399f9..d631e58 100644 --- a/loader/Makefile.in +++ b/loader/Makefile.in @@ -26,6 +26,7 @@ LIBS=-lxml2 -lSDL -lstdc++ ../libudis86/libudis86.a LDFLAGS=-m32 -rdynamic CC = @CC@ +CXX = @CXX@ HEADERS = \ debug.h \ From wine.msi@hidden Tue Dec 16 08:18:06 2008 From: wine.msi@hidden (Mike McCormack) Date: Mon Dec 15 22:18:16 2008 Subject: Fixes for compiling with g++ 4.3.2 In-Reply-To: <871vwfjdzs.fsf@msgid.hilluzination.de> References: <871vwfjdzs.fsf@msgid.hilluzination.de> Message-ID: <392fb48f0812151318x329fbb85if8f1e4b3f3a43edc@mail.gmail.com> Hi Hilko! Sorry for the delayed response, and thanks for the patch! I'm travelling at the moment, but will push it ASAP. Did you manage to get the tests to run after fixing compiling? thanks, Mike 2008/12/11 Hilko Bengen > Hi, > > when trying to get ring3k from git to compile on an i386 > Debian/unstable box, I got the following error: > > ,---- > | g++ -m32 -rdynamic -o ntl ptrace_if.o atom.o block.o completion.o debug.o > driver.o event.o fiber.o file.o job.o kthread.o mailslot.o mem.o mutant.o > namedpipe.o ntcall.o ntgdi.o ntl.o ntuser.o objdir.o object.o platform.o > port.o profile.o process.o ptrace_base.o random.o reg.o section.o > semaphore.o skas.o symlink.o syscall.o thread.o timer.o token.o tt.o > unicode.o -lxml2 -lSDL -lstdc++ ../libudis86/libudis86.a > | ntuser.o: In function `NtUserProcessConnect(void*, void*, unsigned > long)': > | ntuser.cpp:(.text+0x1db8): undefined reference to `long > object_from_handle(process_t*&, void*, unsigned long)' > | collect2: ld returned 1 exit status > | make[1]: *** [ntl] Error 1 > | make[1]: Leaving directory `/home/hbengen/tmp/ring3k/loader' > | make: *** [loader_dir] Error 2 > `---- > > I tried a few things without havnig much of a clue what I was doing. > > First I went to compile loader/ using older g++ versions. A patch for > declaring CXX in the configure script is included below. (g++ 4.2 > turned out to compile the code just fine.) > > Finally, I figured out that apparently all to get g++ 4.3 to compile > the userspace loader was adding > > #include "object.inl" > > to loader/ntuser.cpp > > Cheers, > -Hilko > > diff --git a/configure.ac b/configure.ac > index f890212..ffee715 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1,6 +1,8 @@ > > AC_INIT(ring3k,0.0.14) > > +AC_PROG_CC > +AC_PROG_CXX > AC_CONFIG_HEADERS([include/config.h]) > AC_CHECK_HEADERS([asm/ptrace.h]) > AC_CHECK_HEADERS([valgrind/valgrind.h]) > diff --git a/loader/Makefile.in b/loader/Makefile.in > index 26399f9..d631e58 100644 > --- a/loader/Makefile.in > +++ b/loader/Makefile.in > @@ -26,6 +26,7 @@ LIBS=-lxml2 -lSDL -lstdc++ ../libudis86/libudis86.a > LDFLAGS=-m32 -rdynamic > > CC = @CC@ > +CXX = @CXX@ > > HEADERS = \ > debug.h \ > _______________________________________________ > ring3k mailing list > ring3k@ring3k.org > http://lists.infowares.com/cgi-bin/listinfo/ring3k > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.infowares.com/archive/ring3k/attachments/20081215/d60c0801/attachment.htm From bengen@hidden Tue Dec 16 19:02:18 2008 From: bengen@hidden (Hilko Bengen) Date: Tue Dec 16 19:02:43 2008 Subject: Fixes for compiling with g++ 4.3.2 In-Reply-To: <392fb48f0812151318x329fbb85if8f1e4b3f3a43edc@mail.gmail.com> (Mike McCormack's message of "Tue\, 16 Dec 2008 08\:18\:06 +1100") References: <871vwfjdzs.fsf@msgid.hilluzination.de> <392fb48f0812151318x329fbb85if8f1e4b3f3a43edc@mail.gmail.com> Message-ID: <87zliwathx.fsf@msgid.hilluzination.de> "Mike McCormack" writes: > Did you manage to get the tests to run after fixing compiling? Not all of them. 1. Using CC=gcc-4.2 CXX=g++-4.2 ------------------------------- In most attempts, the `thread' test leads to a process called `ttclient' consuming 100% CPU time; if I kill -9 that process, it outputs "failed to get registers". Sometimes, after I have killed the `ttclient' process during the `thread' test, I get an error in the `wine-port' test. Occasionally, the `thread' test fails with a "1014: debug: 185: wait failed" message. wine-port 1018: debug: 115: Expected STATUS_SUCCESS, got c0000033 process 0010 thread 1014 1 threads 1 processes left 2. CC=gcc-4.3 CXX=g++-4.2 ------------------------- I have been able to observe the same errors with the `thread' and the `wine-port' test cases. 3. CC=gcc-4.2 CXX=g++-4.3 ------------------------- I have been able to observe the same errors with the `thread' and the `wine-port' test cases. The `file' test (./loader/ntl -q \??\c:\tests\file.exe) eats CPU time and rapidly leaks memory every time I call it. Strange: If I run ./runtest -q file straight from the shell, without using make, I don't get this behavior, but a bunch of failed tests. 1014: debug: 234: failed to query directory 80000006 1014: debug: 139: information wrong 00000062 1014: debug: 144: FileNameLength wrong 4 1014: debug: 145: FileName wrong 1014: debug: 146: FileAttributes wrong 00000010 1014: debug: 256: query failed c000000f 1014: debug: 139: information wrong 00000001 1014: debug: 144: FileNameLength wrong 2 1014: debug: 145: FileName wrong 1014: debug: 146: FileAttributes wrong 00000010 1014: debug: 276: query failed c000000f 1014: debug: 139: information wrong 00000001 1014: debug: 144: FileNameLength wrong 2 1014: debug: 145: FileName wrong 1014: debug: 146: FileAttributes wrong 00000010 1014: debug: 297: query failed c000000f 1014: debug: 139: information wrong 00000001 1014: debug: 144: FileNameLength wrong 2 1014: debug: 145: FileName wrong 1014: debug: 146: FileAttributes wrong 00000010 1014: debug: 306: query failed c000000f 1014: debug: 139: information wrong 00000001 1014: debug: 144: FileNameLength wrong 2 1014: debug: 145: FileName wrong 1014: debug: 146: FileAttributes wrong 00000010 1014: debug: 311: query failed c000000f 1014: debug: 139: information wrong 00000001 1014: debug: 144: FileNameLength wrong 2 1014: debug: 145: FileName wrong 1014: debug: 146: FileAttributes wrong 00000010 1014: debug: 30 failed, 117 passed 4. CC=gcc-4.3 CXX=g++-4.3 ------------------------- Same as (3). 5. General ---------- Whenever the terminal window is resized while the tests run, I am presented with the debugger prompt, apparently because of SIGWINCH being caught. This can't be right, can it? Here's a patch. diff --git a/loader/ptrace_base.cpp b/loader/ptrace_base.cpp index f0c017f..59c9146 100644 --- a/loader/ptrace_base.cpp +++ b/loader/ptrace_base.cpp @@ -328,6 +328,9 @@ void ptrace_address_space_impl::run( void *TebBaseAddress, PCONTEXT ctx, int sin if (WIFSTOPPED(status) && WEXITSTATUS(status) == SIGALRM) break; + if (WIFSTOPPED(status) && WEXITSTATUS(status) == SIGWINCH) + break; + if (WIFSTOPPED(status) && single_step) break; Cheers, -Hilko From wine.msi@hidden Wed Dec 17 10:24:50 2008 From: wine.msi@hidden (Mike McCormack) Date: Wed Dec 17 00:24:58 2008 Subject: Fixes for compiling with g++ 4.3.2 In-Reply-To: <87zliwathx.fsf@msgid.hilluzination.de> References: <871vwfjdzs.fsf@msgid.hilluzination.de> <392fb48f0812151318x329fbb85if8f1e4b3f3a43edc@mail.gmail.com> <87zliwathx.fsf@msgid.hilluzination.de> Message-ID: <392fb48f0812161524i637f6f68nb566e926277946a7@mail.gmail.com> Hi Hilko, Which machine are you running the tests on? The tests run successfully on my Mac Mini (Intel Core Duo), built with gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21). (from Debian Etch) The thread test case that you're hitting runs an infinite loop on the client side (ttclient), to make sure that it the kernel preempts correctly after a short timeout. My guess would be that there's a race with the timer setup or the SIGALRM is not handled correctly. Perhaps try adding a dprintf in ptrace_address_space_impl::run and see what's happening to the SIGALRM, if it's coming at all. I've pushed all your patches onto the public git repository. I probably won't be adding any of my own until I get back from holidays at the start of January. thanks, Mike 2008/12/17 Hilko Bengen > 1. Using CC=gcc-4.2 CXX=g++-4.2 > ------------------------------- > > In most attempts, the `thread' test leads to a process called > `ttclient' consuming 100% CPU time; if I kill -9 that process, it > outputs "failed to get registers". > > Sometimes, after I have killed the `ttclient' process during the > `thread' test, I get an error in the `wine-port' test. > > Occasionally, the `thread' test fails with a "1014: debug: 185: wait > failed" message. > > wine-port > 1018: debug: 115: Expected STATUS_SUCCESS, got c0000033 > process 0010 > thread 1014 > 1 threads 1 processes left > > 2. CC=gcc-4.3 CXX=g++-4.2 > ------------------------- > > I have been able to observe the same errors with the `thread' and the > `wine-port' test cases. > > 3. CC=gcc-4.2 CXX=g++-4.3 > ------------------------- > > I have been able to observe the same errors with the `thread' and the > `wine-port' test cases. > > The `file' test (./loader/ntl -q \??\c:\tests\file.exe) eats CPU time > and rapidly leaks memory every time I call it. > > Strange: If I run ./runtest -q file straight from the shell, without > using make, I don't get this behavior, but a bunch of failed tests. > > 1014: debug: 234: failed to query directory 80000006 > 1014: debug: 139: information wrong 00000062 > 1014: debug: 144: FileNameLength wrong 4 > 1014: debug: 145: FileName wrong > 1014: debug: 146: FileAttributes wrong 00000010 > 1014: debug: 256: query failed c000000f > 1014: debug: 139: information wrong 00000001 > 1014: debug: 144: FileNameLength wrong 2 > 1014: debug: 145: FileName wrong > 1014: debug: 146: FileAttributes wrong 00000010 > 1014: debug: 276: query failed c000000f > 1014: debug: 139: information wrong 00000001 > 1014: debug: 144: FileNameLength wrong 2 > 1014: debug: 145: FileName wrong > 1014: debug: 146: FileAttributes wrong 00000010 > 1014: debug: 297: query failed c000000f > 1014: debug: 139: information wrong 00000001 > 1014: debug: 144: FileNameLength wrong 2 > 1014: debug: 145: FileName wrong > 1014: debug: 146: FileAttributes wrong 00000010 > 1014: debug: 306: query failed c000000f > 1014: debug: 139: information wrong 00000001 > 1014: debug: 144: FileNameLength wrong 2 > 1014: debug: 145: FileName wrong > 1014: debug: 146: FileAttributes wrong 00000010 > 1014: debug: 311: query failed c000000f > 1014: debug: 139: information wrong 00000001 > 1014: debug: 144: FileNameLength wrong 2 > 1014: debug: 145: FileName wrong > 1014: debug: 146: FileAttributes wrong 00000010 > 1014: debug: 30 failed, 117 passed > > 4. CC=gcc-4.3 CXX=g++-4.3 > ------------------------- > > Same as (3). > > 5. General > ---------- > > Whenever the terminal window is resized while the tests run, I am > presented with the debugger prompt, apparently because of SIGWINCH > being caught. This can't be right, can it? Here's a patch. > > diff --git a/loader/ptrace_base.cpp b/loader/ptrace_base.cpp > index f0c017f..59c9146 100644 > --- a/loader/ptrace_base.cpp > +++ b/loader/ptrace_base.cpp > @@ -328,6 +328,9 @@ void ptrace_address_space_impl::run( void > *TebBaseAddress, PCONTEXT ctx, int sin > if (WIFSTOPPED(status) && WEXITSTATUS(status) == SIGALRM) > break; > > + if (WIFSTOPPED(status) && WEXITSTATUS(status) == SIGWINCH) > + break; > + > if (WIFSTOPPED(status) && single_step) > break; > > Cheers, > -Hilko > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.infowares.com/archive/ring3k/attachments/20081216/8c39b052/attachment.htm