ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2011
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
16 participants
242 discussions
Start a n
N
ew thread
[pschweitzer] 54626: [NTDLL] Include ReactOS internal headers first
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Fri Dec 9 16:29:06 2011 New Revision: 54626 URL:
http://svn.reactos.org/svn/reactos?rev=54626&view=rev
Log: [NTDLL] Include ReactOS internal headers first Modified: trunk/reactos/dll/ntdll/ntdll.rbuild Modified: trunk/reactos/dll/ntdll/ntdll.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ntdll.rbuild?rev…
============================================================================== --- trunk/reactos/dll/ntdll/ntdll.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/ntdll.rbuild [iso-8859-1] Fri Dec 9 16:29:06 2011 @@ -4,9 +4,9 @@ <module name="ntdll" type="nativedll" entrypoint="0" baseaddress="${BASEADDRESS_NTDLL}" installbase="system32" installname="ntdll.dll" iscrt="yes"> <bootstrap installbase="$(CDOUTPUT)/system32" /> <importlibrary definition="def/ntdll.pspec" /> + <include base="ReactOS">include/reactos/subsys</include> <include base="ntdll">include</include> <include base="ntdll" root="intermediate"></include> - <include base="ReactOS">include/reactos/subsys</include> <define name="__NTDLL__" /> <define name="_NTOSKRNL_" /> <define name="CRTDLL" />
13 years
1
0
0
0
[cgutman] 54625: [ACTCTX] - Add a missing assignment - Try #1 to fix KVM
by cgutman@svn.reactos.org
Author: cgutman Date: Fri Dec 9 16:04:14 2011 New Revision: 54625 URL:
http://svn.reactos.org/svn/reactos?rev=54625&view=rev
Log: [ACTCTX] - Add a missing assignment - Try #1 to fix KVM Modified: trunk/reactos/dll/ntdll/ldr/ldrutils.c Modified: trunk/reactos/dll/ntdll/ldr/ldrutils.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/ldrutils.c?r…
============================================================================== --- trunk/reactos/dll/ntdll/ldr/ldrutils.c [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/ldr/ldrutils.c [iso-8859-1] Fri Dec 9 16:04:14 2011 @@ -114,6 +114,7 @@ needed = (wcslen(SharedUserData->NtSystemRoot) * sizeof(WCHAR) + sizeof(winsxsW) + info->ulAssemblyDirectoryNameLength + nameW.Length + 2*sizeof(WCHAR)); + p = fullname; //if (!(*fullname = p = RtlAllocateHeap( GetProcessHeap(), 0, needed ))) //{ //status = STATUS_NO_MEMORY;
13 years
1
0
0
0
[cgutman] 54624: [USETUP] - Optimize cabinet file processing by finding files sequentially instead of starting from the beginning each time
by cgutman@svn.reactos.org
Author: cgutman Date: Fri Dec 9 14:51:57 2011 New Revision: 54624 URL:
http://svn.reactos.org/svn/reactos?rev=54624&view=rev
Log: [USETUP] - Optimize cabinet file processing by finding files sequentially instead of starting from the beginning each time Modified: trunk/reactos/base/setup/usetup/cabinet.c trunk/reactos/base/setup/usetup/cabinet.h trunk/reactos/base/setup/usetup/filesup.c Modified: trunk/reactos/base/setup/usetup/cabinet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/cabinet.…
============================================================================== --- trunk/reactos/base/setup/usetup/cabinet.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/cabinet.c [iso-8859-1] Fri Dec 9 14:51:57 2011 @@ -694,6 +694,23 @@ } /* + * FUNCTION: Finds the next file in the cabinet that matches a search criteria + * ARGUMENTS: + * FileName = Pointer to search criteria + * Search = Pointer to search structure + * RETURNS: + * Status of operation + */ +ULONG +CabinetFindNextFileSequential(PWCHAR FileName, + PCAB_SEARCH Search) +{ + DPRINT("CabinetFindNextFileSequential( FileName = %S )\n", FileName); + wcsncpy(Search->Search, FileName, MAX_PATH); + return CabinetFindNext(Search); +} + +/* * FUNCTION: Finds next file in the cabinet that matches a search criteria * ARGUMENTS: * Search = Pointer to search structure @@ -703,7 +720,6 @@ ULONG CabinetFindNext(PCAB_SEARCH Search) { - ULONG Status; PCFFILE Prev; ANSI_STRING AnsiString; UNICODE_STRING UnicodeString; @@ -766,33 +782,9 @@ Search->Index++; if (Search->Index >= PCABHeader->FileCount) { - /* we have reached the end of this cabinet, try to open the next */ + /* we have reached the end of this cabinet */ DPRINT("End of cabinet reached\n"); - if (wcslen(DiskNext) > 0) - { - CloseCabinet(); - - CabinetSetCabinetName(CabinetNext); - wcscpy(Search->Cabinet, CabinetName); - - if (DiskChangeHandler != NULL) - { - DiskChangeHandler(CabinetNext, DiskNext); - } - - Status = CabinetOpen(); - if (Status != CAB_STATUS_SUCCESS) - return Status; - } - else - { - return CAB_STATUS_NOFILE; - } - - /* starting new search or cabinet */ - Search->File = (PCFFILE)(FileBuffer + PCABHeader->FileTableOffset); - Search->Index = 0; - Prev = 0; + return CAB_STATUS_NOFILE; } else Search->File = (PCFFILE)(strchr((char *)(Search->File + 1), 0) + 1); Modified: trunk/reactos/base/setup/usetup/cabinet.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/cabinet.…
============================================================================== --- trunk/reactos/base/setup/usetup/cabinet.h [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/cabinet.h [iso-8859-1] Fri Dec 9 14:51:57 2011 @@ -191,8 +191,10 @@ VOID CabinetClose(VOID); /* Locates the first file in the current cabinet file that matches a search criteria */ ULONG CabinetFindFirst(PWCHAR FileName, PCAB_SEARCH Search); -/* Locates the next file in the current cabinet file */ +/* Locates the next file that matches the current search criteria */ ULONG CabinetFindNext(PCAB_SEARCH Search); +/* Locates the next file in the current cabinet file sequentially */ +ULONG CabinetFindNextFileSequential(PWCHAR FileName, PCAB_SEARCH Search); /* Extracts a file from the current cabinet file */ ULONG CabinetExtractFile(PCAB_SEARCH Search); /* Select codec engine to use */ Modified: trunk/reactos/base/setup/usetup/filesup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/filesup.…
============================================================================== --- trunk/reactos/base/setup/usetup/filesup.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/filesup.c [iso-8859-1] Fri Dec 9 14:51:57 2011 @@ -35,6 +35,7 @@ static BOOLEAN HasCurrentCabinet = FALSE; static WCHAR CurrentCabinetName[MAX_PATH]; +static CAB_SEARCH Search; NTSTATUS SetupCreateDirectory(PWCHAR DirectoryName) @@ -275,7 +276,6 @@ PWCHAR DestinationPathName) { ULONG CabStatus; - CAB_SEARCH Search; DPRINT("SetupExtractFile(CabinetFileName %S, SourceFileName %S, DestinationPathName %S)\n", CabinetFileName, SourceFileName, DestinationPathName); @@ -288,6 +288,16 @@ if ((HasCurrentCabinet) && (wcscmp(CabinetFileName, CurrentCabinetName) == 0)) { DPRINT("Using same cabinet as last time\n"); + + /* Use our last location because the files should be sequential */ + CabStatus = CabinetFindNextFileSequential(SourceFileName, &Search); + if (CabStatus != CAB_STATUS_SUCCESS) + { + DPRINT("Sequential miss on file: %S\n", SourceFileName); + + /* Looks like we got unlucky */ + CabStatus = CabinetFindFirst(SourceFileName, &Search); + } } else { @@ -315,10 +325,18 @@ DPRINT("Cannot open cabinet (%d)\n", CabStatus); return STATUS_UNSUCCESSFUL; } - } + + /* We have to start at the beginning here */ + CabStatus = CabinetFindFirst(SourceFileName, &Search); + } + + if (CabStatus != CAB_STATUS_SUCCESS) + { + DPRINT1("Unable to find '%S' in cabinet '%S'\n", SourceFileName, CabinetGetCabinetName()); + return STATUS_UNSUCCESSFUL; + } CabinetSetDestinationPath(DestinationPathName); - CabinetFindFirst( SourceFileName, &Search ); CabStatus = CabinetExtractFile(&Search); if (CabStatus != CAB_STATUS_SUCCESS) {
13 years
1
0
0
0
[fireball] 54623: [ACTCTX] - Improve and rewrite a few active context support functions in RTL, making them more close to their real functionality and throwing away wineisms. - Uncomment a line in ...
by fireball@svn.reactos.org
Author: fireball Date: Fri Dec 9 10:33:09 2011 New Revision: 54623 URL:
http://svn.reactos.org/svn/reactos?rev=54623&view=rev
Log: [ACTCTX] - Improve and rewrite a few active context support functions in RTL, making them more close to their real functionality and throwing away wineisms. - Uncomment a line in RtlAllocateActivationContextStack() which was causing it to always allocate a new activation context stack even if there was one. Thanks to my previous commit in kernel32 counterpart, this hack is not needed anymore and memory won't be wasted. - Since we have mostly Wine's code in our activation context implementation, it makes sense to use it properly until it's rewritten, so first of all: - Properly initialize current process's activation context support by calling actctx_init() from LdrpInitializeProcess instead of calling it all the time when a new context is created. - Bring in create_module_activation_context and find_actctx_dll (newer version from Wine which supports manifests/assmeblies in local directories) and use it. Every place where it's used is marked as a HACK so it will be easy to detach it later. - Remove actctx-related hack LdrpInitializeThread, now it works properly. - Fix a typo in LdrpMapDll found by rafalh. Now the error-detection condition will be correctly evaluated. See issue #6611 for more details. Modified: trunk/reactos/dll/ntdll/ldr/ldrinit.c trunk/reactos/dll/ntdll/ldr/ldrutils.c trunk/reactos/lib/rtl/actctx.c Modified: trunk/reactos/dll/ntdll/ldr/ldrinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/ldrinit.c?re…
============================================================================== --- trunk/reactos/dll/ntdll/ldr/ldrinit.c [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/ldr/ldrinit.c [iso-8859-1] Fri Dec 9 10:33:09 2011 @@ -87,6 +87,7 @@ ULONG RtlpShutdownProcessFlags; // TODO: Use it NTSTATUS LdrPerformRelocations(PIMAGE_NT_HEADERS NTHeaders, PVOID ImageBase); +void actctx_init(void); #ifdef _WIN64 #define DEFAULT_SECURITY_COOKIE 0x00002B992DDFA232ll @@ -504,19 +505,11 @@ NtCurrentTeb()->RealClientId.UniqueThread); /* Allocate an Activation Context Stack */ - /* FIXME: This is a hack for Wine's actctx stuff */ DPRINT("ActivationContextStack %p\n", NtCurrentTeb()->ActivationContextStackPointer); - if (!(NtCurrentTeb()->ActivationContextStackPointer)) - { - Status = RtlAllocateActivationContextStack((PVOID*)&NtCurrentTeb()->ActivationContextStackPointer); - if (NT_SUCCESS(Status)) - { - DPRINT("ActivationContextStack %p\n", NtCurrentTeb()->ActivationContextStackPointer); - DPRINT("ActiveFrame %p\n", ((PACTIVATION_CONTEXT_STACK)NtCurrentTeb()->ActivationContextStackPointer)->ActiveFrame); - NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame = NULL; - } - else - DPRINT1("Warning: Unable to allocate ActivationContextStack\n"); + Status = RtlAllocateActivationContextStack((PVOID*)&NtCurrentTeb()->ActivationContextStackPointer); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Warning: Unable to allocate ActivationContextStack\n"); } /* Make sure we are not shutting down */ @@ -1946,6 +1939,9 @@ InsertHeadList(&Peb->Ldr->InInitializationOrderModuleList, &LdrpNtDllDataTableEntry->InInitializationOrderModuleList); + /* Initialize Wine's active context implementation for the current process */ + actctx_init(); + /* Set the current directory */ Status = RtlSetCurrentDirectory_U(&CurrentDirectory); if (!NT_SUCCESS(Status)) Modified: trunk/reactos/dll/ntdll/ldr/ldrutils.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/ldrutils.c?r…
============================================================================== --- trunk/reactos/dll/ntdll/ldr/ldrutils.c [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/ldr/ldrutils.c [iso-8859-1] Fri Dec 9 10:33:09 2011 @@ -19,6 +19,122 @@ BOOLEAN g_ShimsEnabled; /* FUNCTIONS *****************************************************************/ + +/* NOTE: Remove those two once our actctx support becomes better */ +NTSTATUS create_module_activation_context( LDR_DATA_TABLE_ENTRY *module ) +{ + NTSTATUS status; + LDR_RESOURCE_INFO info; + IMAGE_RESOURCE_DATA_ENTRY *entry; + + info.Type = (ULONG)RT_MANIFEST; + info.Name = (ULONG)ISOLATIONAWARE_MANIFEST_RESOURCE_ID; + info.Language = 0; + if (!(status = LdrFindResource_U( module->DllBase, &info, 3, &entry ))) + { + ACTCTXW ctx; + ctx.cbSize = sizeof(ctx); + ctx.lpSource = NULL; + ctx.dwFlags = ACTCTX_FLAG_RESOURCE_NAME_VALID | ACTCTX_FLAG_HMODULE_VALID; + ctx.hModule = module->DllBase; + ctx.lpResourceName = (LPCWSTR)ISOLATIONAWARE_MANIFEST_RESOURCE_ID; + status = RtlCreateActivationContext( &module->EntryPointActivationContext, &ctx ); + } + return status; +} + +NTSTATUS find_actctx_dll( LPCWSTR libname, WCHAR *fullname ) +{ + static const WCHAR winsxsW[] = {'\\','w','i','n','s','x','s','\\',0}; + static const WCHAR dotManifestW[] = {'.','m','a','n','i','f','e','s','t',0}; + + ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION *info; + ACTCTX_SECTION_KEYED_DATA data; + UNICODE_STRING nameW; + NTSTATUS status; + SIZE_T needed, size = 1024; + WCHAR *p; + + RtlInitUnicodeString( &nameW, libname ); + data.cbSize = sizeof(data); + status = RtlFindActivationContextSectionString( FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX, NULL, + ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, + &nameW, &data ); + if (status != STATUS_SUCCESS) return status; + + for (;;) + { + if (!(info = RtlAllocateHeap( RtlGetProcessHeap(), 0, size ))) + { + status = STATUS_NO_MEMORY; + goto done; + } + status = RtlQueryInformationActivationContext( 0, data.hActCtx, &data.ulAssemblyRosterIndex, + AssemblyDetailedInformationInActivationContext, + info, size, &needed ); + if (status == STATUS_SUCCESS) break; + if (status != STATUS_BUFFER_TOO_SMALL) goto done; + RtlFreeHeap( RtlGetProcessHeap(), 0, info ); + size = needed; + } + + DPRINT("manifestpath === %S\n", info->lpAssemblyManifestPath); + DPRINT("DirectoryName === %S\n", info->lpAssemblyDirectoryName); + if (!info->lpAssemblyManifestPath || !info->lpAssemblyDirectoryName) + { + status = STATUS_SXS_KEY_NOT_FOUND; + goto done; + } + + if ((p = wcsrchr( info->lpAssemblyManifestPath, '\\' ))) + { + DWORD dirlen = info->ulAssemblyDirectoryNameLength / sizeof(WCHAR); + + p++; + if (_wcsnicmp( p, info->lpAssemblyDirectoryName, dirlen ) || wcsicmp( p + dirlen, dotManifestW )) + { + /* manifest name does not match directory name, so it's not a global + * windows/winsxs manifest; use the manifest directory name instead */ + dirlen = p - info->lpAssemblyManifestPath; + needed = (dirlen + 1) * sizeof(WCHAR) + nameW.Length; + + p = fullname; + /*if (!(*fullname = p = RtlAllocateHeap( GetProcessHeap(), 0, needed ))) + { + status = STATUS_NO_MEMORY; + goto done; + }*/ + memcpy( p, info->lpAssemblyManifestPath, dirlen * sizeof(WCHAR) ); + p += dirlen; + wcscpy( p, libname ); + goto done; + } + } + + needed = (wcslen(SharedUserData->NtSystemRoot) * sizeof(WCHAR) + + sizeof(winsxsW) + info->ulAssemblyDirectoryNameLength + nameW.Length + 2*sizeof(WCHAR)); + + //if (!(*fullname = p = RtlAllocateHeap( GetProcessHeap(), 0, needed ))) + //{ + //status = STATUS_NO_MEMORY; + //goto done; + //} + wcscpy( p, SharedUserData->NtSystemRoot ); + p += wcslen(p); + memcpy( p, winsxsW, sizeof(winsxsW) ); + p += sizeof(winsxsW) / sizeof(WCHAR); + memcpy( p, info->lpAssemblyDirectoryName, info->ulAssemblyDirectoryNameLength ); + p += info->ulAssemblyDirectoryNameLength / sizeof(WCHAR); + *p++ = '\\'; + wcscpy( p, libname ); + +done: + RtlFreeHeap( RtlGetProcessHeap(), 0, info ); + RtlReleaseActivationContext( data.hActCtx ); + DPRINT("%S\n", fullname); + return status; +} + NTSTATUS NTAPI @@ -559,6 +675,7 @@ PWCHAR NameBuffer, p1, p2 = 0; ULONG Length; ULONG BufSize = 500; + NTSTATUS Status; /* Allocate space for full DLL name */ FullDllName->Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, BufSize + sizeof(UNICODE_NULL)); @@ -573,14 +690,25 @@ if (!Length || Length > BufSize) { - if (ShowSnaps) - { - DPRINT1("LDR: LdrResolveDllName - Unable to find "); - DPRINT1("%ws from %ws\n", DllName, DllPath ? DllPath : LdrpDefaultPath.Buffer); - } - - RtlFreeUnicodeString(FullDllName); - return FALSE; + /* HACK: Try to find active context dll */ + Status = find_actctx_dll(DllName, FullDllName->Buffer); + if(Status == STATUS_SUCCESS) + { + Length = wcslen(FullDllName->Buffer) * sizeof(WCHAR); + DPRINT1("found %S for %S\n", FullDllName->Buffer, DllName); + } + else + { + /* NOTE: This code should remain after removing the hack */ + if (ShowSnaps) + { + DPRINT1("LDR: LdrResolveDllName - Unable to find "); + DPRINT1("%ws from %ws\n", DllName, DllPath ? DllPath : LdrpDefaultPath.Buffer); + } + + RtlFreeUnicodeString(FullDllName); + return FALSE; + } } /* Construct full DLL name */ @@ -1269,7 +1397,7 @@ } /* Check if this was a non-relocatable DLL or a known dll */ - if (!RelocatableDll && KnownDll) + if (!RelocatableDll || KnownDll) { /* Setup for hard error */ HardErrorParameters[0] = (ULONG_PTR)&IllegalDll; @@ -1847,7 +1975,7 @@ PVOID ViewBase = NULL; SIZE_T ViewSize = 0; PIMAGE_NT_HEADERS NtHeader, NtHeader2; - DPRINT("LdrpCheckForLoadedDll('%S' '%wZ' %d %d %p)\n", DllPath, DllName, Flag, RedirectedDll, LdrEntry); + DPRINT("LdrpCheckForLoadedDll('%S' '%wZ' %d %d %p)\n", DllPath ? ((ULONG_PTR)DllPath == 1 ? L"" : DllPath) : L"", DllName, Flag, RedirectedDll, LdrEntry); /* Check if a dll name was provided */ if (!(DllName->Buffer) || !(DllName->Buffer[0])) return FALSE; @@ -1910,6 +2038,16 @@ /* Check if that was successful */ if (!(Length) || (Length > (sizeof(NameBuf) - sizeof(UNICODE_NULL)))) { + /* HACK: Try to find active context dll */ + Status = find_actctx_dll(DllName->Buffer, FullDllName.Buffer); + if(Status == STATUS_SUCCESS) + { + Length = wcslen(FullDllName.Buffer) * sizeof(WCHAR); + DPRINT1("found %S for %S\n", FullDllName.Buffer, DllName->Buffer); + } + else + { + if (ShowSnaps) { DPRINT1("LDR: LdrpCheckForLoadedDll - Unable To Locate %ws: 0x%08x\n", @@ -1918,6 +2056,7 @@ /* Return failure */ return FALSE; + } } /* Full dll name is found */ Modified: trunk/reactos/lib/rtl/actctx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/actctx.c?rev=54623…
============================================================================== --- trunk/reactos/lib/rtl/actctx.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/actctx.c [iso-8859-1] Fri Dec 9 10:33:09 2011 @@ -1659,6 +1659,9 @@ IMAGE_RESOURCE_DATA_ENTRY* entry = NULL; void *ptr; + //DPRINT( "looking for res %s in module %p %s\n", resname, + // hModule, filename ); + #if 0 if (TRACE_ON(actctx)) { @@ -2428,19 +2431,41 @@ } VOID +NTAPI +RtlFreeActivationContextStack(PACTIVATION_CONTEXT_STACK Stack) +{ + PRTL_ACTIVATION_CONTEXT_STACK_FRAME ActiveFrame, PrevFrame; + + /* Nothing to do if there is no stack */ + if (!Stack) return; + + /* Get the current active frame */ + ActiveFrame = Stack->ActiveFrame; + + /* Go through them in backwards order and release */ + while (ActiveFrame) + { + PrevFrame = ActiveFrame->Previous; + RtlReleaseActivationContext(ActiveFrame->ActivationContext); + RtlFreeHeap(RtlGetProcessHeap(), 0, ActiveFrame); + ActiveFrame = PrevFrame; + } + + /* Zero out the active frame */ + Stack->ActiveFrame = NULL; + + /* TODO: Empty the Frame List Cache */ + ASSERT(IsListEmpty(&Stack->FrameListCache)); + + /* Free activation stack memory */ + RtlFreeHeap(RtlGetProcessHeap(), 0, Stack); +} + +VOID NTAPI RtlFreeThreadActivationContextStack(void) { - RTL_ACTIVATION_CONTEXT_STACK_FRAME *frame; - - frame = NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame; - while (frame) - { - RTL_ACTIVATION_CONTEXT_STACK_FRAME *prev = frame->Previous; - RtlReleaseActivationContext( frame->ActivationContext ); - RtlFreeHeap( RtlGetProcessHeap(), 0, frame ); - frame = prev; - } - NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame = NULL; + RtlFreeActivationContextStack(NtCurrentTeb()->ActivationContextStackPointer); + NtCurrentTeb()->ActivationContextStackPointer = NULL; } @@ -2757,17 +2782,22 @@ { PACTIVATION_CONTEXT_STACK ContextStack; - /* FIXME: Check if it's already allocated */ - //if (*Context) return STATUS_SUCCESS; - + /* Check if it's already allocated */ + if (*Context) return STATUS_SUCCESS; + + /* Allocate space for the context stack */ ContextStack = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof (ACTIVATION_CONTEXT_STACK) ); if (!ContextStack) { return STATUS_NO_MEMORY; } - ContextStack->ActiveFrame = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RTL_ACTIVATION_CONTEXT_STACK_FRAME)); - if (!ContextStack->ActiveFrame) return STATUS_NO_MEMORY; + /* Initialize the context stack */ + ContextStack->Flags = 0; + ContextStack->ActiveFrame = NULL; + InitializeListHead(&ContextStack->FrameListCache); + ContextStack->NextCookieSequenceNumber = 1; + ContextStack->StackId = 1; //TODO: Timer-based *Context = ContextStack;
13 years
1
0
0
0
[rharabien] 54622: - Revert a revert - KVM is broken
by rharabien@svn.reactos.org
Author: rharabien Date: Thu Dec 8 23:14:54 2011 New Revision: 54622 URL:
http://svn.reactos.org/svn/reactos?rev=54622&view=rev
Log: - Revert a revert - KVM is broken Modified: trunk/reactos/tools/rsym/rsym.c Modified: trunk/reactos/tools/rsym/rsym.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rsym/rsym.c?rev=5462…
============================================================================== --- trunk/reactos/tools/rsym/rsym.c [iso-8859-1] (original) +++ trunk/reactos/tools/rsym/rsym.c [iso-8859-1] Thu Dec 8 23:14:54 2011 @@ -432,34 +432,6 @@ } static int -IncludeRelocationsForSection(PIMAGE_SECTION_HEADER SectionHeader) -{ - static char *BlacklistedSections[] = - { - ".edata", - ".reloc" - }; - char SectionName[IMAGE_SIZEOF_SHORT_NAME]; - unsigned i; - - if (0 != (SectionHeader->Characteristics & IMAGE_SCN_LNK_REMOVE)) - { - return 0; - } - - for (i = 0; i < sizeof(BlacklistedSections) / sizeof(BlacklistedSections[0]); i++) - { - strncpy(SectionName, BlacklistedSections[i], IMAGE_SIZEOF_SHORT_NAME); - if (0 == memcmp(SectionName, SectionHeader->Name, IMAGE_SIZEOF_SHORT_NAME)) - { - return 0; - } - } - - return 1; -} - -static int ProcessRelocations(ULONG *ProcessedRelocsLength, void **ProcessedRelocs, void *RawData, PIMAGE_OPTIONAL_HEADER OptHeader, unsigned NumberOfSections, PIMAGE_SECTION_HEADER SectionHeaders) @@ -504,7 +476,7 @@ { TargetSectionHeader = FindSectionForRVA(BaseReloc->VirtualAddress, NumberOfSections, SectionHeaders); - if (NULL != TargetSectionHeader && IncludeRelocationsForSection(TargetSectionHeader)) + if (NULL != TargetSectionHeader) { AcceptedRelocs = *ProcessedRelocs; Found = 0;
13 years
1
0
0
0
[rmessiant] 54621: [SYSSETUP] - When writing a newline, write just a newline. Prevents garbage in setuplog.txt. CID 14128.
by rmessiant@svn.reactos.org
Author: rmessiant Date: Thu Dec 8 21:23:17 2011 New Revision: 54621 URL:
http://svn.reactos.org/svn/reactos?rev=54621&view=rev
Log: [SYSSETUP] - When writing a newline, write just a newline. Prevents garbage in setuplog.txt. CID 14128. Modified: trunk/reactos/dll/win32/syssetup/logfile.c Modified: trunk/reactos/dll/win32/syssetup/logfile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/logfile…
============================================================================== --- trunk/reactos/dll/win32/syssetup/logfile.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/syssetup/logfile.c [iso-8859-1] Thu Dec 8 21:23:17 2011 @@ -91,7 +91,6 @@ IN DWORD dwSeverity, IN LPWSTR lpMessageText) { - const LPCSTR lpNewLine = "\r\n"; LPCSTR lpSeverityString; LPSTR lpMessageString; DWORD dwMessageLength; @@ -185,11 +184,7 @@ NULL); /* Write newline */ - WriteFile(hLogFile, - lpNewLine, - sizeof(lpNewLine), - &dwWritten, - NULL); + WriteFile(hLogFile, "\r\n", 2, &dwWritten, NULL); HeapFree(GetProcessHeap(), 0,
13 years
1
0
0
0
[cgutman] 54620: [TCPIP] - Fix IPPacket double free in IPSendDatagram failure case
by cgutman@svn.reactos.org
Author: cgutman Date: Thu Dec 8 21:21:25 2011 New Revision: 54620 URL:
http://svn.reactos.org/svn/reactos?rev=54620&view=rev
Log: [TCPIP] - Fix IPPacket double free in IPSendDatagram failure case Modified: trunk/reactos/lib/drivers/ip/network/icmp.c trunk/reactos/lib/drivers/ip/transport/rawip/rawip.c trunk/reactos/lib/drivers/ip/transport/tcp/if.c trunk/reactos/lib/drivers/ip/transport/udp/udp.c Modified: trunk/reactos/lib/drivers/ip/network/icmp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/icm…
============================================================================== --- trunk/reactos/lib/drivers/ip/network/icmp.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/network/icmp.c [iso-8859-1] Thu Dec 8 21:21:25 2011 @@ -23,29 +23,6 @@ return STATUS_SUCCESS; } - -VOID SendICMPComplete( - PVOID Context, - PNDIS_PACKET Packet, - NDIS_STATUS NdisStatus) -/* - * FUNCTION: ICMP datagram transmit completion handler - * ARGUMENTS: - * Context = Pointer to context infomation (IP_PACKET) - * Packet = Pointer to NDIS packet - * NdisStatus = Status of transmit operation - * NOTES: - * This routine is called by IP when a ICMP send completes - */ -{ - TI_DbgPrint(DEBUG_ICMP, ("Freeing NDIS packet (%X).\n", Packet)); - - /* Free packet */ - FreeNdisPacket(Packet); - - TI_DbgPrint(DEBUG_ICMP, ("Done\n")); -} - BOOLEAN PrepareICMPPacket( PADDRESS_FILE AddrFile, @@ -219,10 +196,7 @@ Status = IPSendDatagram(&Packet, NCE); if (!NT_SUCCESS(Status)) - { - Packet.Free(&Packet); return Status; - } *DataUsed = DataSize; Modified: trunk/reactos/lib/drivers/ip/transport/rawip/rawip.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/r…
============================================================================== --- trunk/reactos/lib/drivers/ip/transport/rawip/rawip.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/transport/rawip/rawip.c [iso-8859-1] Thu Dec 8 21:21:25 2011 @@ -254,10 +254,7 @@ Status = IPSendDatagram(&Packet, NCE); if (!NT_SUCCESS(Status)) - { - Packet.Free(&Packet); return Status; - } *DataUsed = DataSize; Modified: trunk/reactos/lib/drivers/ip/transport/tcp/if.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/t…
============================================================================== --- trunk/reactos/lib/drivers/ip/transport/tcp/if.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/transport/tcp/if.c [iso-8859-1] Thu Dec 8 21:21:25 2011 @@ -61,10 +61,7 @@ NdisStatus = IPSendDatagram(&Packet, NCE); if (!NT_SUCCESS(NdisStatus)) - { - Packet.Free(&Packet); return ERR_RTE; - } return 0; } Modified: trunk/reactos/lib/drivers/ip/transport/udp/udp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/u…
============================================================================== --- trunk/reactos/lib/drivers/ip/transport/udp/udp.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/transport/udp/udp.c [iso-8859-1] Thu Dec 8 21:21:25 2011 @@ -230,10 +230,7 @@ Status = IPSendDatagram(&Packet, NCE); if (!NT_SUCCESS(Status)) - { - Packet.Free(&Packet); return Status; - } *DataUsed = DataSize;
13 years
1
0
0
0
[rharabien] 54619: - Partially revert r54613 to fix test bot
by rharabien@svn.reactos.org
Author: rharabien Date: Thu Dec 8 20:28:06 2011 New Revision: 54619 URL:
http://svn.reactos.org/svn/reactos?rev=54619&view=rev
Log: - Partially revert r54613 to fix test bot Modified: trunk/reactos/tools/rsym/rsym.c Modified: trunk/reactos/tools/rsym/rsym.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rsym/rsym.c?rev=5461…
============================================================================== --- trunk/reactos/tools/rsym/rsym.c [iso-8859-1] (original) +++ trunk/reactos/tools/rsym/rsym.c [iso-8859-1] Thu Dec 8 20:28:06 2011 @@ -432,6 +432,34 @@ } static int +IncludeRelocationsForSection(PIMAGE_SECTION_HEADER SectionHeader) +{ + static char *BlacklistedSections[] = + { + ".edata", + ".reloc" + }; + char SectionName[IMAGE_SIZEOF_SHORT_NAME]; + unsigned i; + + if (0 != (SectionHeader->Characteristics & IMAGE_SCN_LNK_REMOVE)) + { + return 0; + } + + for (i = 0; i < sizeof(BlacklistedSections) / sizeof(BlacklistedSections[0]); i++) + { + strncpy(SectionName, BlacklistedSections[i], IMAGE_SIZEOF_SHORT_NAME); + if (0 == memcmp(SectionName, SectionHeader->Name, IMAGE_SIZEOF_SHORT_NAME)) + { + return 0; + } + } + + return 1; +} + +static int ProcessRelocations(ULONG *ProcessedRelocsLength, void **ProcessedRelocs, void *RawData, PIMAGE_OPTIONAL_HEADER OptHeader, unsigned NumberOfSections, PIMAGE_SECTION_HEADER SectionHeaders) @@ -476,7 +504,7 @@ { TargetSectionHeader = FindSectionForRVA(BaseReloc->VirtualAddress, NumberOfSections, SectionHeaders); - if (NULL != TargetSectionHeader) + if (NULL != TargetSectionHeader && IncludeRelocationsForSection(TargetSectionHeader)) { AcceptedRelocs = *ProcessedRelocs; Found = 0;
13 years
1
0
0
0
[fireball] 54618: [KERNEL32] - Zero-initialize ActivationContextStack pointer before calling RtlAllocateActivationContextStack(). This allows to get rid of some hacks in the existing ActCtx support...
by fireball@svn.reactos.org
Author: fireball Date: Thu Dec 8 19:40:25 2011 New Revision: 54618 URL:
http://svn.reactos.org/svn/reactos?rev=54618&view=rev
Log: [KERNEL32] - Zero-initialize ActivationContextStack pointer before calling RtlAllocateActivationContextStack(). This allows to get rid of some hacks in the existing ActCtx support in the ntdll loader and actual implementation. Modified: trunk/reactos/dll/win32/kernel32/client/thread.c Modified: trunk/reactos/dll/win32/kernel32/client/thread.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/client/thread.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/thread.c [iso-8859-1] Thu Dec 8 19:40:25 2011 @@ -182,7 +182,7 @@ if (hProcess == NtCurrentProcess()) { PTEB Teb; - PVOID ActivationContextStack; + PVOID ActivationContextStack = NULL; THREAD_BASIC_INFORMATION ThreadBasicInfo; #ifndef SXS_SUPPORT_FIXME ACTIVATION_CONTEXT_BASIC_INFORMATION ActivationCtxInfo;
13 years
1
0
0
0
[rmessiant] 54617: [WIN32K] - Probe the whole SIZE struct arguments, not a pointer size. LPSIZE -> SIZE. CID 14119, 14120.
by rmessiant@svn.reactos.org
Author: rmessiant Date: Thu Dec 8 19:38:58 2011 New Revision: 54617 URL:
http://svn.reactos.org/svn/reactos?rev=54617&view=rev
Log: [WIN32K] - Probe the whole SIZE struct arguments, not a pointer size. LPSIZE -> SIZE. CID 14119, 14120. Modified: trunk/reactos/subsystems/win32/win32k/objects/coord.c Modified: trunk/reactos/subsystems/win32/win32k/objects/coord.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] Thu Dec 8 19:38:58 2011 @@ -587,7 +587,7 @@ { _SEH2_TRY { - ProbeForWrite(pSize, sizeof(LPSIZE), 1); + ProbeForWrite(pSize, sizeof(SIZE), 1); pSize->cx = pdcattr->szlViewportExt.cx; pSize->cy = pdcattr->szlViewportExt.cy; @@ -633,7 +633,7 @@ _SEH2_TRY { - ProbeForWrite(pSize, sizeof(LPSIZE), 1); + ProbeForWrite(pSize, sizeof(SIZE), 1); X = pdcattr->szlWindowExt.cx; if (pdcattr->dwLayout & LAYOUT_RTL) X = -X;
13 years
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
25
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Results per page:
10
25
50
100
200