Commit graph

51112 commits

Author SHA1 Message Date
Timo Kreuzer df4294e89c [LSASRV]
Initialize an uninitialized variable in AttributeSize. Fixes crashing advapi32_winetest lsa

svn path=/trunk/; revision=56443
2012-04-29 10:51:28 +00:00
Timo Kreuzer 7de47192fe [PSEH]
Fix a serious bug in PSEH that could lead to stack corruption and was causing CSRSS to crash, when large amounts of text were output on the console.
Background: PSEH used __builtin_alloca to allocate an SEH registration frame on the stack on demand, ie only for the first try level. But there are some nasty things with __builtin_alloca: First it DOES NOT - as one might think - free the allocated memory, once the allocation "goes out of scope", like with local variables, but only on function exit. Therefore it cannot normally be used inside a loop. The trick that PSEH used to "fix" this problem, was to save the stack pointer and reset it back at the end. This is quite problematic, since the rest of the code might assume that the stack pointer is still where it was left off after the allocation. The other thing is that __builtin_alloca() can allocate the memory whenever it likes to. It can allocate everything on function entry or not allocate anything at all, when other stack variables that went out of scope have left enough space to be reused. In csrss it now happened that the allocation was done before the stack pointer was saved, so the memory could not be freed by restoring the old stack pointer value. That lead to slowly eating up the stack since the code was inside a loop.
The allocation is now replaced with a variable sized array. The variable stays in scope until the _SEH2_END and will be automaticall cleaned up by the compiler. This also makes saving and restoring the stack pointer obsolete.
Reliability++

svn path=/trunk/; revision=56442
2012-04-28 20:00:09 +00:00
Art Yerkes b621664add [NTOSKRNL]
Remove PAGEOPs and use the argument to pass relevant information where needed,
including generally a section page table entry or a PFN_NUMBER.

In its place, the code looks for an MM_WAIT_ENTRY in the appropriate place and
waits, returning STATUS_MM_RESTART_OPERATION.  Rather than copying the pagein
and CoW operations in the PAGEOP contention case, we just punt back and restart
the operation, resulting in simpler code.

svn path=/trunk/; revision=56441
2012-04-28 02:56:31 +00:00
Timo Kreuzer 4d93b7e8d5 [WIN32K]
When a DC has the default palette selected, use the color value from PALETTERGB() directly instead of looking it up in the dc palette (just as the code was before). Fixes skipped bitmap winetests

svn path=/trunk/; revision=56440
2012-04-27 17:18:30 +00:00
Timo Kreuzer d926eda7ce [WIN32K]
- In NtGdiSetPixel, return the real RGB value, which is the target format color translated back to RGB, not the desired RGB value. Fixes a few bitmap winetest.
- Handle a too large index in PALETTE_ulGetRGBColorFromIndex

svn path=/trunk/; revision=56439
2012-04-27 16:46:12 +00:00
Thomas Faber e5491506f1 [RTL]
- Do not null terminate buffer before initializing its length in RtlDosSearchPath_Ustr. Use unicode string functions made for this purpose instead.
See issue #7010 for more details.

svn path=/trunk/; revision=56438
2012-04-27 11:04:09 +00:00
Timo Kreuzer dfa925989c [WIN32K]
In NtGdiGetPixel check if the requested pixel is inside the boundaries of the surface, and return CLR_INVALID if not.

svn path=/trunk/; revision=56437
2012-04-27 10:12:26 +00:00
Timo Kreuzer e33dcea4d4 [WIN32K]
Fix initialization of XLATEOBJ in NtGdiGetPixel. Fixes GetPixel regressions.

svn path=/trunk/; revision=56436
2012-04-27 09:31:24 +00:00
Thomas Faber ea9cf8c55d [KMTEST]
- Fix GCC build

svn path=/trunk/; revision=56435
2012-04-27 08:50:57 +00:00
Thomas Faber 0515cd1d2e [KMTESTS/RTL]
- Add a small RtlException test, mainly to check that a stack overflow really throws STATUS_STACK_OVERFLOW, not STATUS_ACCESS_VIOLATION.

svn path=/trunk/; revision=56434
2012-04-27 08:36:58 +00:00
Timo Kreuzer 348bef46b7 [WIN32K]
- add missing  DBG_DECREASE_LOCK_COUNT() when deleting an object that was exclusively locked. Fixes strange hang in comctl32_winetest.
The question is: why does changing a variable, which is never checked cause such trouble?
- Don't pass the DC's clip object to IntEngCopyBits, when querying a pixel
- make acExclusiveLockCount[] 0x20 bytes long, just to be really sure, that (x & 0x1F) does never overflow it.

svn path=/trunk/; revision=56433
2012-04-26 21:48:06 +00:00
Thomas Faber 46a246e79b [WINED3D]
- Do not rely on undefined behavior to get values easily accessible as constants.
- Quick build fix. Will be sent to Wine, possibly modified.

svn path=/trunk/; revision=56432
2012-04-26 17:20:53 +00:00
Thomas Faber 3c49ba735f [CMAKE]
- Enable MSVC build for Wine DirectX libraries, which mostly work just fine.

svn path=/trunk/; revision=56431
2012-04-26 16:51:27 +00:00
Timo Kreuzer 196349d550 [WIN32K]
Fix palette index wraparound when initializing a DIB palette with DIB_PAL_COLORS. Fixes gdi32_winetest::palette

svn path=/trunk/; revision=56430
2012-04-26 16:32:01 +00:00
Timo Kreuzer e43f7b0dfa [WIN32K]
- Implement TranslateCOLORREF, based on IntHandleSpecialColorType, but now returning both the translated color and the resulting RGB color, correctly handling DIBINDEX, which will use the given value without translation.
- Rewrite NtGdiSetPixel using IntPatBlt
- Rewrite NtGdiGetPixel  using IntEngCopyBits
- Fix EXLATEOBJ_iXlateTable to return 0, when the palette index is too big, instead of wrapping around
- Remove old debugcode

svn path=/trunk/; revision=56429
2012-04-26 16:19:22 +00:00
Timo Kreuzer eb00489bf8 [WIN32K]
Fix NtGdiPatBlt: ROPs with a source are not allowed, the background ROP is simply ignored.

svn path=/trunk/; revision=56428
2012-04-26 09:42:46 +00:00
Timo Kreuzer 416711ec61 [WIN32K]
Pass EBRUSHOBJ to IntPatBlt instead of the BRUSH. This way we can use the DC's eboFill, instead of initializing a new EBRUSHOBJ.

svn path=/trunk/; revision=56427
2012-04-26 09:30:15 +00:00
Thomas Faber 9a9ec7bb7c [RTL]
- Accept NULL Buffer/Size in RtlGetFullPathName_Ustr
- Fix NULL dereference in RtlGetFullPathName_UstrEx if no StaticString was given
- Various other corrections to path functions. 17 test failures fixed overall.

svn path=/trunk/; revision=56426
2012-04-25 22:21:00 +00:00
Timo Kreuzer c1dd858adc [WIN32K]
Make sure a bitmap is compatible with the dc before selecting it.

svn path=/trunk/; revision=56425
2012-04-25 19:25:48 +00:00
Timo Kreuzer 05599f98f0 [GDI32]
Fix SetWindowExtEx to pass all tests

svn path=/trunk/; revision=56424
2012-04-25 18:15:41 +00:00
Timo Kreuzer e28f37f061 [GDI32_APITEST]
Add more tests for SetWindowExtEx

svn path=/trunk/; revision=56423
2012-04-25 18:14:52 +00:00
Timo Kreuzer 0e6b454957 [WIN32K]
- Make XFORMOBJ_iSetXform fail, when the XFORM is invalid (eM11 or eM22 are 0)
- Handle error in GreModifyWorldTransform

svn path=/trunk/; revision=56422
2012-04-25 17:29:50 +00:00
Timo Kreuzer ca47627718 [GDI32]
Fix CombineTransform to pass all tests

svn path=/trunk/; revision=56421
2012-04-25 15:20:55 +00:00
Timo Kreuzer 308687a953 [GDI32_APITEST]
Add more tests for CombineTransform and cleanup the code a bit

svn path=/trunk/; revision=56420
2012-04-25 15:18:12 +00:00
Thomas Faber c1abc87910 [NTDLL_APITEST]
- Try GetProcAddress even on private functions. Allows easier testing in ROS by temporarily exporting them.

svn path=/trunk/; revision=56419
2012-04-25 13:06:30 +00:00
Timo Kreuzer 3263e4fd82 {ROSTESTS]
Fix compilation

svn path=/trunk/; revision=56418
2012-04-25 12:42:40 +00:00
Timo Kreuzer 652128646c [WINETESTS]
Add some useful macros to wine/test.h

svn path=/trunk/; revision=56417
2012-04-25 12:38:23 +00:00
Thomas Faber d0683c7f6f [NTDLL_APITEST]
- Add a test for RtlDoesFileExists_U (and its three friends, if addresses are provided)
- Various small path test improvements

svn path=/trunk/; revision=56416
2012-04-25 12:13:38 +00:00
Thomas Faber eefe549b17 [NDK]
- Remove RtlDoesFileExists_UstrEx

svn path=/trunk/; revision=56415
2012-04-25 12:04:44 +00:00
Thomas Faber 74de187fd6 [KERNEL32]
- Do not use Zw functions from user mode

svn path=/trunk/; revision=56414
2012-04-25 10:17:29 +00:00
Thomas Faber bf4b9fbaad [NTDLL_APITEST]
- Add a test for RtlGetFullPathName_Ustr (requires the function address to be known)
- Various improvements to the other path tests

svn path=/trunk/; revision=56413
2012-04-25 09:52:38 +00:00
Thomas Faber 5eecc92cb2 [NTDLL_APITEST]
- Fix GCC build

svn path=/trunk/; revision=56412
2012-04-25 07:57:50 +00:00
Thomas Faber fb43dc26f7 [NTDLL_APITEST]
- Add test for RtlGetLongestNtPathLength
- Add test for RtlDetermineDosPathNameType_U (and RtlDetermineDosPathNameType_Ustr, if address is known)

svn path=/trunk/; revision=56411
2012-04-25 07:43:33 +00:00
Thomas Faber 6eef1df19a [RTL/NDK]
- Add missing mmtypes.h include in mmfuncs.h
- Remove RtlDetermineDosPathNameType_Ustr from rtlfuncs.h, move it up in path.c
- Add RtlGetLongestNtPathLength to rtlfuncs.h

svn path=/trunk/; revision=56410
2012-04-25 07:24:17 +00:00
Timo Kreuzer 94545a76fb [WIN32K]
- Fix a bug in the region code that could cause allocating 0 bytes
- Remove SetLastError()
- "flatten" IntGdiCombineRgn making it more readable

svn path=/trunk/; revision=56409
2012-04-24 18:35:50 +00:00
Timo Kreuzer 65873aaab9 [GDI32_APITEST]
- Add tests for CombineRgn

svn path=/trunk/; revision=56408
2012-04-24 17:11:08 +00:00
Timo Kreuzer e4b20ac135 [WIN32K/GDI32]
- rewrite GetObject again :)
- simplify and fix FontGetObject
- remove some pointless code

svn path=/trunk/; revision=56407
2012-04-24 14:49:09 +00:00
Cameron Gutman d8580d250c [USBSTOR]
-  Add forgotten storage of the LUN in the PDO extension which not only broke units beyond LUN 0 but also caused a BSOD due to reporting duplicate devices to the PnP manager
- Thanks to tower for reporting

svn path=/trunk/; revision=56406
2012-04-24 14:47:15 +00:00
Timo Kreuzer 4fc848b780 [GDI32_APITEST]
- Add more tests for GetObject

svn path=/trunk/; revision=56405
2012-04-24 14:45:12 +00:00
Thomas Faber fc12d8ead4 [AFD] - Fix broken IP address pointer arithmetic (CID 14130)
[PCNET] - Fix incorrectly truncated FullDuplex BOOLEAN

svn path=/trunk/; revision=56404
2012-04-24 07:27:59 +00:00
James Tabor 1356410d99 - Fix message regressions from 54637.
svn path=/trunk/; revision=56403
2012-04-24 02:29:07 +00:00
Timo Kreuzer bbf9dac724 [GDI32_APITEST]
- Add more tests for GetObject and SelectObject
- Fix a bug that made gcc builds crash

svn path=/trunk/; revision=56402
2012-04-23 22:16:50 +00:00
Timo Kreuzer aa85f812bd [GDI32/WIN32K]
Fix some regressions from previous commit

svn path=/trunk/; revision=56401
2012-04-23 21:22:12 +00:00
Timo Kreuzer 4bc462e69c [GDI32/WIN32K]
- Rewrite GetCurrentObject and GetObject, fixes a lot of tests

svn path=/trunk/; revision=56400
2012-04-23 19:22:17 +00:00
James Tabor 3b3feb61a8 - Safe to test SetForegroundWindow.
svn path=/trunk/; revision=56399
2012-04-23 19:09:31 +00:00
Timo Kreuzer 4bea149dd8 fix build
svn path=/trunk/; revision=56398
2012-04-23 19:06:10 +00:00
Timo Kreuzer ce51c9773d [GDI32_APITEST]
- Add more tests for GetCurrentObject and GetObject
- Comment out tests that fail on debug builds

svn path=/trunk/; revision=56397
2012-04-23 19:02:51 +00:00
James Tabor 3e02fbea93 [Win32SS]
- Desktop: Added code for server side switch over and some notes. Did not include desktopbg.c.
- Focus: Fixes wine Win tests for SetParent, Active, Focus and Foreground. Leaving the wine todos. Msg tests improved. Pop up menus are still broken see bug 6751. The tests reflect these pop up menu issues.
- WinPos: (WIP) Fixed MapWindowPoints. Arrange icons is still broken. SetWindowPos sets the foreground when it should.
- Implemented AllowSetForegroundWindow and LockSetForegroundWindow.
- Commit to reset base lines for RegTest ComCtl32 and related bugs.
- Coding credits and complements go out to the Wine team.

svn path=/trunk/; revision=56396
2012-04-23 18:51:48 +00:00
Amine Khaldi 7f3808dd4f [PSDK]
* Add the missing PWIN32_FIND_DATA type.

svn path=/trunk/; revision=56395
2012-04-23 16:43:05 +00:00
Timo Kreuzer cc8ff50175 [GDI32_APITEST]
Fix build

svn path=/trunk/; revision=56394
2012-04-23 10:56:45 +00:00