On Mon, Nov 10, 2008 at 9:25 AM, <gschneider(a)svn.reactos.org> wrote:
> Author: gschneider
> Date: Mon Nov 10 08:25:24 2008
> New Revision: 37281
>
> URL: http://svn.reactos.org/svn/reactos?rev=37281&view=rev
> Log:
> Implement ConvertSecurityDescriptorToStringSecurityDescriptorW based on Wine code.
Please add the appropriate copyright headers to the source file
stating the original author when implementing code based on third
party sources.
--
Steven Edwards
"There is one thing stronger than all the armies in the world, and
that is an idea whose time has come." - Victor Hugo
Hi,
I have recently been working on getting SEH into the x64 port. This
covers several parts. One of them is compiler support.
On x64 SEH is table based rather than code based, that means it needs
tables of unwind data. These can be generated from DWARF unwind info -
which gcc generates - and that's what I'm working on.
The x64 version of rsym shall parse the DWARF unwind data and convert it
into Windows compatible unwind data.
Now there is a problem. While older versions of mingw64 used the
".debug_frame" section, the newer versions use the ".eh_frame" section.
That is good and bad at the same time. What does that mean? What's the
difference?
The .eh_frame section isn't part of the DWARF 2 or 3 specification, it's
a GNU extension / part of the LSB-Core specification. Documentation was
hard to find, but google is your friend and it seems there's only one
major difference to the debug_frame section and that is relative
addressing rather than absolute. This is actually very good and saves
the day for all modules that live in kernel space, because the addresses
are only 32 bits.
There is still a problem left. While the .debug_frame section is by
default put into the output executable as a seperate section, the
.eh_frame section isn't. The default linker script puts it into the
".rdata" section. But there it's kinda lost and I don't want to keep it
anyway.
With ntoskrnl there's no problem as it uses it's own linker script
anyway. I can change it, so the .eh_frame section is put at the end of
the executable. But how do I do this for the other modules? Do i need to
provide a new default linkerscript for all other modules? Can I "fix"
this behavior in RosBE64 (the files in lib/ldscripts seem to be unused)?
Or does anyone know a command line option to change this default behavior?
Regards,
Timo
On Nov 7, 2008, at 11:31 PM, cgutman(a)svn.reactos.org wrote:
> Author: cgutman
> Date: Fri Nov 7 14:31:34 2008
> New Revision: 37248
>
> URL: http://svn.reactos.org/svn/reactos?rev=37248&view=rev
> Log:
> - Check the status of IPSendDatagram
> - Validate the protocol
> - Use the hash value of the NCE address to get the lock
> - Simplify TCPAbortListenForSocket
> - Hardcode the length of the array
>
> + HashValue = *(PULONG)(&NCE->Address.Address);
> + HashValue ^= HashValue >> 16;
> + HashValue ^= HashValue >> 8;
> + HashValue ^= HashValue >> 4;
> + HashValue &= NB_HASHMASK;
It's used at least three times in the source code, I would do an
inline hash-calculating function for that.
On Fri, Nov 7, 2008 at 4:54 AM, Aleksey Bragin <aleksey(a)reactos.org> wrote:
> I highly doubt they work, in fact I'm sure they won't work at all.
> But their only duty is to allow building unmodified rpcrt4 from Wine.
> I still have a hope, somewhere very very deep in my soul, that Wine
> will stop using linux-specific APIs in DLLs.
You can hope and dream.
One of the problems we saw, such as in the case of wininet, using unix
sockets instead of winsock gave something like a 20% speedup in
performance. Another issue was that select on linux (thanks to glibc)
fixes FD_SETSIZE at 1024 so the solution was to move to using poll().
The poll/select thing is not that big of a deal as it can be wrapped
but fixing the winsock performance issues may require someone to
dedicate a lot of time profiling. If you can fix all of the issues so
that performance will be the same with pure win32, then I am sure
Alexandre will accept it.
--
Steven Edwards
"There is one thing stronger than all the armies in the world, and
that is an idea whose time has come." - Victor Hugo
Hi,
LOL, Wine code does not work at all.... I tested Area.exe with the
latest head and it dies and the application continues to work with out
drawing the PATH figures.
ReactOS:
(subsystems/win32/win32k/objects/gdiobj.c:544) Object->cExclusiveLock = 1
(subsystems/win32/win32k/objects/path.c:1911) BeginPath 1 0xbc07024b
(subsystems/win32/win32k/objects/path.c:1936) BeginPath 2 h 0xbd07024b
p 0x8d9b4830
(subsystems/win32/win32k/objects/path.c:2022) EndPath 0xbd07024b
(ntoskrnl/mm/rpoolmgr.h:820) Trying to allocate 8192 bytes from paged
pool - nothing suitable found, returning NULL
(subsystems/win32/win32k/objects/path.c:1609) Should never happen
(subsystems/win32/win32k/objects/path.c:1609) Should never happen
(subsystems/win32/win32k/objects/path.c:1609) Should never happen
(subsystems/win32/win32k/objects/path.c:1609) Should never happen
(subsystems/win32/win32k/objects/path.c:1609) Should never happen
(subsystems/win32/win32k/objects/path.c:1612) Got path flag
(ntoskrnl/mm/rpoolmgr.h:820) Trying to allocate 4096 bytes from paged
pool - nothing suitable found, returning NULL
<snip>
(ntoskrnl/mm/rpoolmgr.h:820) Trying to allocate 11264 bytes from paged
pool - nothing suitable found, returning NULL
(subsystems/win32/win32k/objects/gdiobj.c:544) Object->cExclusiveLock = 1
(subsystems/win32/win32k/objects/path.c:1911) BeginPath 1 0xbd07024b
(subsystems/win32/win32k/objects/path.c:1936) BeginPath 2 h 0xbe07024b
p 0x8d9b4830
(subsystems/win32/win32k/objects/path.c:2022) EndPath 0xbe07024b
(ntoskrnl/mm/rpoolmgr.h:820) Trying to allocate 2048 bytes from paged
pool - nothing suitable found, returning NULL
<snip>
(ntoskrnl/mm/rpoolmgr.h:820) Trying to allocate 2400 bytes from paged
pool - nothing suitable found, returning NULL
Entered debugger on last-chance exception (Exception Code: 0xc0000005)
(Page Fault)
Memory at 0x000004B0 could not be written: Page not present.
kdb:> bt
Eip:
<win32k.sys:84c9c (subsystems/win32/win32k/objects/bezier.c:160
(GDI_InternalBezier@20))>
Frames:
<win32k.sys:84dfd (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:84deb (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:84dfd (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:84deb (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:84dfd (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:84deb (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:84deb (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:84dfd (subsystems/win32/win32k/objects/bezier.c:178
(GDI_InternalBezier@20))>
<win32k.sys:85008 (subsystems/win32/win32k/objects/bezier.c:216
(@GDI_Bezier@12))>
<win32k.sys:a1760 (subsystems/win32/win32k/objects/path.c:988
(@PATH_AddFlatBezier@12))>
<win32k.sys:a286a (subsystems/win32/win32k/objects/path.c:1019
(@PATH_FlattenPath@4))>
<win32k.sys:a295e (subsystems/win32/win32k/objects/path.c:1514
(NtGdiWidenPath@4))>
<NTOSKRNL.EXE:a145a (ntoskrnl/ke/i386/trap.s:244 (KiFastCallEntry))>
<ntdll.dll:5f1e>
<Area.exe:35ad>
<04ec8353>
Couldn't access memory at 0x56E58959!
kdb:>
The problem is in IntCreatePolyPolygonRgn, it is based on Xorg
mipolygen.c. The figure is some what complex and this old Xorg code
seems to become over whelmed by it. IntCreatePolyPolygonRgn calles
REGION_InsertionSort hundreds or even thousands of times. Using Qemu
you will sit there all night and that is the reason for using hardware
for this test. The first figure was 3 polygons with a total of 516
points. Question is, why is that so hard to map and sort? I assume the
next three figures have the same or close to the same amount of
points. Since they do look and draw about the same.
The bug report has GDI_InternalBezier faulting out the kernel, well
since there is no more PagedPool available so it returned a NULL
without faulting.
I'm looking into alternative methods that are much simpler than the
Xorg code for mapping and filling regions. My best one is from
Graphapp, it is a modified variation of the same Xorgs poly code. This
means more time I do not have to work out a hypothesise and rewrite
all of the region code.
FYI: Our Xorg code is the same Xorg code that is in wine....... I
assume wine code breaks and bombs out when the memory pool empties.
Which is not avalid excuse not to draw.
Thanks,
James
On Thu, Nov 6, 2008 at 7:05 AM, Aleksey Bragin <aleksey(a)reactos.org> wrote:
> How does this code work in Wine without this change?
>
> WBR,
> Aleksey.
>
How does this code work in Wine without this change?
WBR,
Aleksey.
On Nov 6, 2008, at 2:55 PM, jimtabor(a)svn.reactos.org wrote:
> Author: jimtabor
> Date: Thu Nov 6 05:55:08 2008
> New Revision: 37223
>
> URL: http://svn.reactos.org/svn/reactos?rev=37223&view=rev
> Log:
> - Fix WidenPath. Now Area.exe runs and crashes when using real
> hardware. That is a good thing. We now know our Xorg based region
> code has problems. It allocates all the memory building PolyPolygon
> region data.