Commit graph

141 commits

Author SHA1 Message Date
Joachim Henze bc7a641f18 [0.4.11][CRT] Fix 2 MSVC compiler warnings CORE-17812
observed with MSVC2010SP1 16.0.40219.1 x86-target in dbg+rls-config several times:
sdk\lib\crt\string\wtoi64.c(28) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
sdk\lib\crt\string\wtoi64.c(194) : warning C4146: unary minus operator applied to unsigned type, result still unsigned

the fix is a PARTIAL port of 0.4.15-dev-2951-g 5d8e834897

and while touching the file
fix another white-space-glitch.
in sum that brings us 100% in sync in this file to master 0.4.15-dev-3264-g570cedf.
2022-03-18 21:29:08 +01:00
Joachim Henze f9dc3a86b6 [0.4.11][WIN32SS][RTL] Fix regression CORE-16769 + BSOD 0x50 CORE-13907
The main motivation to port all that back is to get rid of Win32K-BSODs 0x50 like CORE-13907
that could be triggered by user-mode-applications.
Technical reason was CORE-14857 "RtlImageNtHeaderEx needs SEH" and issues with hooks+callbacks.
All other tickets mentioned in here were regressions that we experienced on the long
journey towards perfecting the fixes on master head, and those were not happening yet in the older builds,
so they are mentioned in here only to allow tracking where that code went into.

Thanks to Jim Tabor, Mark Jansen & Thomas Faber
By squashed backmerge of the following commits:
0.4.15-dev-3440-g a89844f740
0.4.15-dev-3430-g 9cff384c22
0.4.14-dev-1287-g 568b6d0558
0.4.14-dev-1255-g 177ae91bf6
0.4.14-dev-1241-g 915a5764a9
0.4.14-dev-1240-g d8add40e89
0.4.14-dev-1002-g feb7df42b4

JIRA-tickets: CORE-13907, CORE-16769, CORE-14857, CORE-17856, CORE-17857, partially CORE-13019.
We also had some more dupes of CORE-13907 in JIRA, but I linked all of them (transitively)
towards the initial report, and resolved them without setting a fixVer for them.

In more detail:
--------------
[USER32] Fix BSOD 0x50 in 'WineVDM + Castle Of Winds' CORE-17856 CORE-17857

CORE-17856 BSOD 0x50 when starting Castle of the Winds second time, with WineVDM
CORE-17857 BSOD 0x50 on shutdown after closing Castle of the Winds with WineVDM

0.4.15-dev-3430-g 9cff384c22
0.4.15-dev-3440-g a89844f740
--------------
[NTUSER] Fix Strings and Format to Hooks

Allocate heap instead of data segment to be used for callbacks on user side.
Move and correct initial hook call out setup. Use it in more than one hook call.

This fixes issues with strings out of alignment and use of kernel pointers.

See CORE-13907 (HXD-portable BSOD) and CORE-16769 (HXD-portable exception)

Small wow update.

cherry picked from commit 0.4.14-dev-1287-g 568b6d0558
--------------
[RTL] Introduce RtlpImageNtHeader,
which implements the required functionality.
ntdll and ntoskrnl now have a wrapper for this, with SEH.
This protects the function against malformed / bad images,
whilst still being able to use the code in freeldr et al.
Idea from Thomas.
CORE-14857

cherry picked from commit 0.4.14-dev-1255-g 177ae91bf6
--------------
[WIN32SS] Form Sanity to Hook Callbacks

Fix WH_CALLWNDPROC/RET data to user hook calls.
Helps with CORE-13907 "(HXD-portable BSOD)"
Fixes the logging of "(win32ss/user/ntuser/callback.c:748) err: Failure to make Callback! Status 0xc00000fd" within CORE-13019, but not the whole ticket.

cherry picked from commit 0.4.14-dev-1241-g 915a5764a9
--------------
[USER32] Fix null return.

See CORE-16769 "HxD 1.7.7.0 portable unhandled exception"

cherry picked from commit 0.4.14-dev-1240-g d8add40e89
--------------
[WIN32SS] Fix a typo in dbg print

cherry picked from commit 0.4.14-dev-1002-g feb7df42b4
2022-03-17 14:00:15 +01:00
Joachim Henze cbe7a5fd14 [0.4.11][CRT] Do Not lock ioinfo when spawning functions (#4099) CORE-15176
This fixes CORE-15176 'Gimp 2.6.11 hangs when opening a file'.
It regressed by 0.4.9-dev-446-g bffd8201d0

Fix picked from 0.4.15-dev-3363-g 252a7530d0
2022-01-09 09:28:17 +01:00
Joachim Henze 26080d0c64 [0.4.11] [RDBSS] Avoid CORE-13938
Pierre recommended this hack-fix for 0.4.8rls before.
Avoids "GetVolumeInformation now fails on NFS volume"

I will not retest any RDBSS functionality myself in my tests,
maybe some other tester would be kind enough to retest this?

Please note that I replaced #if 0 with #if 1
as discussed with Pierre. That's different to the patch in ticket.

like in last release
(cherry picked from commit 1906186e83)
2018-12-12 23:07:49 +01:00
Pierre Schweitzer cdf47d5254
[VFATLIB] Drop a hack no longer needed after f87d9ca 2018-11-25 10:41:22 +01:00
Pierre Schweitzer aac38dfed8
[RDBSS] Fix a typo
Spotted by Hermès
2018-11-24 22:00:09 +01:00
Pierre Schweitzer 738f327668
[IP] Add a TCPGetSocketStatus() wrapper around LibTCPGetSocketStatus() 2018-11-23 22:51:35 +01:00
Pierre Schweitzer 29c1510423
[LWIP] Implement a LibTCPGetSocketStatus() function in our LwIP glue
It is used to query a socket state (established, closed, and so on).
2018-11-23 22:51:35 +01:00
Stanislav Motylkov baf2c0cc2d [DRWTSN32] Add SMBIOS data to the system information (#1017)
[DMILIB][UDMIHELP] Allow functions to be linked with C++ code.
2018-11-21 21:49:15 +01:00
Pierre Schweitzer 7c0a8eb555
[TDILIB] Make tdiGetSetOfThings() return useful status 2018-11-18 16:30:45 +01:00
Pierre Schweitzer c5983e302d
[VFATLIB] Don't attempt to fix volume if not allowed 2018-10-21 11:12:10 +02:00
Hermès Bélusca-Maïto bf8a7d2db0
[CMLIB] Adjust parameter types and annotations. Add diagnostic assertions. 2018-10-14 15:59:31 +02:00
Mark Jansen 2d47c3be29
[CRT] spawn: define a unicode environment when needed
CORE-9182
2018-10-13 20:30:07 +02:00
Hermès Bélusca-Maïto 47d539e6e0
[RTL] Make a RtlQueryEnvironmentVariable_U() DPRINT a little bit more useful. 2018-10-13 19:44:13 +02:00
Eric Kohl bb7292b287 [CRT] Fix two obvious typos in _mbbtype().
Patch by Kudratov Olimjon.

CORE-8545
2018-10-07 22:56:14 +02:00
Mark Jansen 57ed670b5a
[RTL] actctx: When probing a dll for a manifest, use the first manifest id present,
instead of always searching for CREATEPROCESS_MANIFEST_RESOURCE_ID.
CORE-9519
2018-10-01 20:16:10 +02:00
Stanislav Motylkov bae6e075e0
[UDMIHELP] Initialize output buffer if DMI string is NULL 2018-09-29 17:11:08 +03:00
Stanislav Motylkov c356804550
[DMILIB] Process SKU and Family strings 2018-09-29 17:10:48 +03:00
Serge Gautherie cb072fd0fe [CMLIB] Fix compiling as NT6+ (#840)
Addendum to r70582 (734bc291).
CORE-12596
2018-09-05 20:18:14 +02:00
Hermès Bélusca-Maïto cb979bb293
[REACTOS] Introduce a "DEBUGFORMAT" environment variable that allows to select different debug trace formats.
CORE-12671

- The default format is used when no format name is specified: this is
  the one we use so far in ReactOS:

    <debug_class>:(<file>:<line>) <message>

  with "debug_class" being "trace", "warn", "err".

- The "wine" format is the one used by Wine. It can be used when trying
  to diff-compare traces for a module with the corresponding one
  obtained from a Wine run. It can also be useful because the logging of
  Wine-synced code assumes that the function names are automatically
  added by the helper macros "FIXME()", "TRACE()", "WARN()" or "ERR()",
  and not manually inside the logging string given to these macros:
  for example:

    FIXME("(%params) message\n", params);

  displays:

    fixme:<module>:SomeFunc(params) message

- The "extended" (or "ext") format is very noisy and tries to output a
  lot of information; it is a hybrid of the previous two formats:

    <debug_class>:(<file>:<line>):<channel>:SomeFunc <message>

Support for displaying the current process ID is added in
addition to the already existing support for thread ID.
2018-08-30 22:42:50 +02:00
Katayama Hirofumi MZ 0a8ade5dd4
[SDK][CRT] Fix _ismbblead undefined error on MSVC 2018-08-27 11:09:28 +02:00
Hermès Bélusca-Maïto b277cbdf22
[CONUTILS] In ConWrite(), emit an \r when a \n is encountered but not already preceded by \r.
And, don't emit \r\n when an \r alone is encountered.
This fixes the problem of extra newlines appearing when redirecting
"more" output to a file.

CORE-14592
2018-08-23 17:04:53 +02:00
Mark Jansen 69893ccf38 [ATL] Improve the order of operations in CComPtr and CComQIIDPtr 2018-08-19 17:35:18 +02:00
Mike Swanson 3c7e9bb332 Remove unnecessary executable bits 2018-08-15 18:29:09 +02:00
Mark Jansen 9b6fb9f2f8
[RTL][KERNEL32] Add a comment indicating we need SEH in RtlImageNtHeaderEx
CORE-14532
CORE-14857
2018-08-13 13:24:12 +02:00
Stanislav Motylkov 4259aab7b0 [SDK] Add user-mode DMI/SMBIOS helper library
CORE-5961
2018-08-12 14:21:56 +02:00
Serge Gautherie 7d6bda16c6
[REACTOS] Improve how some ASSERTMSG() message values are printed: enforce ending "\n".
NB: Not touching calls in "third-party" code: class and classpnp.
2018-08-08 22:03:45 +02:00
Serge Gautherie fb48381cb4
[CMLIB] Simplify an ASSERTMSG() as an ASSERT(). 2018-08-08 21:45:46 +02:00
Serge Gautherie 97d3b3ce33
[REACTOS] RtlAssert(): use "%lu" as LineNumber format. 2018-08-08 21:24:07 +02:00
Mark Jansen 09719d25c4
[ATL] Fix the CComQIIDPtr template. 2018-08-05 11:54:56 +02:00
Timo Kreuzer cf77354dce [REACTOS] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Timo Kreuzer 9e066abe2a [DRIVERS] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Stanislav Motylkov 0854c69a75 [I8042PRT] Move DMI/SMBIOS parsing functions into library 2018-08-02 21:29:57 +02:00
Victor Perevertkin 2ae1675208 [ASM] Fixed ".double" macro in asm.inc.
GAS uses ".double" symbol for declaring floating-point constants and
".quad" symbol for declaring 64-bit numbers.
This is not compatible with our macro for MASM and introduces bugs.
Now 64-bit constants are supposed to be declared using ".quad" macro.
2018-07-15 23:25:23 +02:00
Timo Kreuzer e39876dab7 [SDK] Fix 64 bit issues 2018-07-01 14:45:21 +02:00
Timo Kreuzer 3b78272d39 [NDK] Fix alignment macros and add missing ones
Remove obsolete ALIGN_UP_BY macro definition
2018-07-01 14:45:21 +02:00
Timo Kreuzer a262e8da2d [LIBUSB] Add additional operator new/delete
This is required, since newer versions of MSVC demand that non-member operator new/delete are in the global namespace and neither static nor inline. See https://msdn.microsoft.com/en-us/library/mt723604.aspx ("Overloaded operator new and operator delete")
2018-07-01 14:45:21 +02:00
Serge Gautherie e5904542d6 [DELAYIMP] Fix/Merge definitions of __pfnDliNotifyHook2 and __pfnDliFailureHook2 2018-06-13 23:28:15 +02:00
Serge Gautherie 9415f94c3a [DELAYIMP] Fix 2 Clang-Cl warnings about __pfnDliNotifyHook2Default and __pfnDliFailureHook2Default
"warning: 'extern' variable has an initializer [-Wextern-initializer]"

CORE-14306
2018-06-13 23:28:15 +02:00
Mark Jansen 4f8dc9c266
[ATL] Add CString.CompareNoCase 2018-06-09 17:14:06 +02:00
Hermès Bélusca-Maïto f215f394d8
[CRT] Always initialize _[w]pgmptr with a *FULL* path to the current application.
Otherwise fall back to the computed argv[0].
This is expected by some applications, for example Git.
Code is adapted from Wine.

Many thanks to Stanislav Motylkov for having investigated this bug!

CORE-12931 CORE-13892 CORE-13898 CORE-14066
2018-06-05 23:55:46 +02:00
Pierre Schweitzer 54f383d996
[VFATLIB] Only check volume if full scan or if allowed to fix it
This allows doing a quick probe about whether a volume needs to be
fixed by checking its dirty bit.

CORE-14692
2018-06-05 19:34:47 +02:00
Pierre Schweitzer 2dfe5e3f46
[CRT] Reimplement qsort() using FreeBSD implementation.
Our implementation had a bug that could be triggered while
building our USBD library on ReactOS: the compare function
could be called with a NULL pointer instead of a valid value.

With this bug fixed (and the cmd hack in CORE-14648), ReactOS
can totally selfhost :-)! I was able to build LiveCD and BootCD
without any trouble, crash, deadlock or whatever.
(Next step: having a buildbot slave hosted on ReactOS ;-)).

Enjoy: https://twitter.com/HeisSpiter/status/1002880397103988737

CORE-14680
2018-06-02 13:56:42 +02:00
Eric Kohl 0f8e720711 [NTDLL_APITEST][LIB_RTL] Add a test for RtlQueryTimeZoneInformation and fix the bug in RtlpQueryRegistryDirect
In working on some problems with Time Zone adjustments in  ReactOS I found that the RtlQueryTimeZoneInformation function is partially broken and wrote an apitest to capture the failures.

Patch by Doug Lyons.

CORE-14658
2018-05-31 16:47:42 +02:00
Pierre Schweitzer 6e4e772e6c
[VFATLIB] Addendum to 469289e 2018-05-28 23:38:00 +02:00
Pierre Schweitzer 86198abd67
[VFATLIB] Fix MSVC build? 2018-05-28 23:29:06 +02:00
Pierre Schweitzer 469289ed5c
[VFATLIB] Upgrade fsck.fat to 4.1
Also make it easier to sync in the future.
2018-05-28 23:18:25 +02:00
Pierre Schweitzer 59dc951bf7
[VFATLIB] Only attempt to clear the dirty set bit in rw mode. 2018-05-28 19:37:56 +02:00
Hermès Bélusca-Maïto 1eca625839
[CONUTILS] Remove old code; modify an informative note. 2018-05-20 22:39:21 +02:00
Hermès Bélusca-Maïto 2b3fd31bc5
[CONUTILS] Use the currently active console codepage to output text to files. If you want to output UTF-8 run "chcp 65001" before.
CORE-12122
2018-05-05 01:37:30 +02:00