https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4ca68ffb1c8adef648400…
commit 4ca68ffb1c8adef6484005ce457bfed7db82b8c3
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sat Nov 9 19:21:11 2024 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Thu Jan 30 11:30:32 2025 +0200
[UCRT] Make __local_stdio_printf/scanf_options GCC compatible
---
sdk/include/ucrt/corecrt_stdio_config.h | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/sdk/include/ucrt/corecrt_stdio_config.h b/sdk/include/ucrt/corecrt_stdio_config.h
index 88e041260d5..360a45824d6 100644
--- a/sdk/include/ucrt/corecrt_stdio_config.h
+++ b/sdk/include/ucrt/corecrt_stdio_config.h
@@ -82,24 +82,20 @@ _CRT_BEGIN_C_HEADER
#endif
#if _CRT_FUNCTIONS_REQUIRED
- // This function must not be inlined into callers to avoid ODR violations. The
- // static local variable has different names in C and in C++ translation units.
+ __declspec(selectany) unsigned __int64 __local_stdio_printf_options_storage;
_Check_return_ _Ret_notnull_
_CRT_INLINE_PURE_SECURITYCRITICAL_ATTRIBUTE
- __declspec(noinline) __inline unsigned __int64* __CRTDECL __local_stdio_printf_options(void)
+ __inline unsigned __int64* __CRTDECL __local_stdio_printf_options(void)
{
- static unsigned __int64 _OptionsStorage;
- return &_OptionsStorage;
+ return &__local_stdio_printf_options_storage;
}
- // This function must not be inlined into callers to avoid ODR violations. The
- // static local variable has different names in C and in C++ translation units.
+ __declspec(selectany) unsigned __int64 __local_stdio_scanf_options_storage;
_Check_return_ _Ret_notnull_
_CRT_INLINE_PURE_SECURITYCRITICAL_ATTRIBUTE
- __declspec(noinline) __inline unsigned __int64* __CRTDECL __local_stdio_scanf_options(void)
+ __inline unsigned __int64* __CRTDECL __local_stdio_scanf_options(void)
{
- static unsigned __int64 _OptionsStorage;
- return &_OptionsStorage;
+ return &__local_stdio_scanf_options_storage;
}
#endif
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b35becef2eb507c90d5b6…
commit b35becef2eb507c90d5b6d4a8c66a2647445cde1
Author: Whindmar Saksit <whindsaks(a)proton.me>
AuthorDate: Wed Jan 29 00:46:11 2025 +0100
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Jan 29 00:46:11 2025 +0100
[RAPPS] Set working directory for zip generated shortcuts (#7674)
Some applications are broken and assume the working directory is the
same as the .exe directory (xrick etc).
---
base/applications/rapps/geninst.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/base/applications/rapps/geninst.cpp b/base/applications/rapps/geninst.cpp
index ba57b53b502..8e96e9e280e 100644
--- a/base/applications/rapps/geninst.cpp
+++ b/base/applications/rapps/geninst.cpp
@@ -309,6 +309,9 @@ CreateShortcut(const CStringW &Target)
{
if (SUCCEEDED(hr = link->SetPath(Target)))
{
+ SplitFileAndDirectory(Target, &tmp);
+ link->SetWorkingDirectory(tmp);
+
if (SUCCEEDED(GetCustomIconPath(Info, tmp)))
{
LPWSTR p = tmp.GetBuffer();
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b9852e83d294f7f047943…
commit b9852e83d294f7f047943ca5eaa89e9aa24462d8
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sun Sep 22 21:43:25 2024 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Tue Jan 28 22:00:56 2025 +0100
[NTOS:EX] HACK: on livecd, disable security features in NtSystemDebugControl
WinDBG can do some local debugging using 'windbg -kl'. In that case,
WinDBG tries to directly use NtSystemDebugControl. If this function
returns an error, WinDBG extracts a driver from its resources.
WinDBG will send IOCTLs to this driver, and this driver will call
KdSystemDebugControl.
However, on livecd (where %SYSTEMROOT% is read-only), WinDBG is unable
to extract the driver from its resources, and can't use the driver to
call KdSystemDebugControl.
As a work-around, allow all control classes in NtSystemDebugControl
in case of livecd.
WinDBG local debugging now also works on livecd (windbg -kl).
---
ntoskrnl/ex/dbgctrl.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/ex/dbgctrl.c b/ntoskrnl/ex/dbgctrl.c
index a62345ee692..5ed32619fee 100644
--- a/ntoskrnl/ex/dbgctrl.c
+++ b/ntoskrnl/ex/dbgctrl.c
@@ -267,7 +267,17 @@ NtSystemDebugControl(
case SysDbgWriteBusData:
case SysDbgCheckLowMemory:
/* Those are implemented in KdSystemDebugControl */
- Status = STATUS_NOT_IMPLEMENTED;
+ if (InitIsWinPEMode)
+ {
+ Status = KdSystemDebugControl(Command,
+ InputBuffer, InputBufferLength,
+ OutputBuffer, OutputBufferLength,
+ &Length, PreviousMode);
+ }
+ else
+ {
+ Status = STATUS_NOT_IMPLEMENTED;
+ }
break;
case SysDbgBreakPoint:
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5547b747179b163bcb115…
commit 5547b747179b163bcb115f58f256c27b8552497c
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sun Sep 22 21:43:10 2024 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Tue Jan 28 22:00:55 2025 +0100
[NTOS:KD64] Fix freezes on first chance exception when KDBG is enabled and KdIgnoreUmExceptions is TRUE
This fixes the following use case:
- Execute 'kdbgctrl.exe -du'
- Execute 'kdbgctrl.exe -cu'
- See that last command never finishes
---
ntoskrnl/kd64/kdtrap.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/ntoskrnl/kd64/kdtrap.c b/ntoskrnl/kd64/kdtrap.c
index 4cfac2b04b0..8af25e3429f 100644
--- a/ntoskrnl/kd64/kdtrap.c
+++ b/ntoskrnl/kd64/kdtrap.c
@@ -318,7 +318,6 @@ KdIsThisAKdTrap(IN PEXCEPTION_RECORD ExceptionRecord,
IN PCONTEXT Context,
IN KPROCESSOR_MODE PreviousMode)
{
-#ifdef _WINKD_
/*
* Determine if this is a valid debug service call and make sure that
* it isn't a software breakpoint
@@ -335,8 +334,4 @@ KdIsThisAKdTrap(IN PEXCEPTION_RECORD ExceptionRecord,
/* We don't have to handle it */
return FALSE;
}
-#else
- /* KDBG has its own mechanism for ignoring user mode exceptions */
- return FALSE;
-#endif
}