Author: arty
Date: Sun Aug 19 09:02:31 2007
New Revision: 28415
URL: http://svn.reactos.org/svn/reactos?rev=28415&view=rev
Log:
Fix part two of the bug:
The actual problem was that we'd overrun the end of the handle count array
when decrementing. This also led to a handle leak (observed). Stop correctly
when we find the handle we want.
Modified:
trunk/reactos/ntoskrnl/ob/obhandle.c
Modified: trunk/reactos/ntoskrnl/ob/obhandle.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obhandle.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obhandle.c (original)
+++ trunk/reactos/ntoskrnl/ob/obhandle.c Sun Aug 19 09:02:31 2007
@@ -331,6 +331,8 @@
/* Insert a new entry */
FreeEntry = ObpInsertHandleCount(ObjectHeader);
if (!FreeEntry) return STATUS_INSUFFICIENT_RESOURCES;
+ ASSERT(!FreeEntry->Process);
+ ASSERT(!FreeEntry->HandleCount);
/* Fill it out */
FreeEntry->Process = Process;
@@ -375,6 +377,8 @@
/* Allocate one */
FreeEntry = ObpInsertHandleCount(ObjectHeader);
if (!FreeEntry) return STATUS_INSUFFICIENT_RESOURCES;
+ ASSERT(!FreeEntry->Process);
+ ASSERT(!FreeEntry->HandleCount);
}
/* Fill out the entry */
@@ -533,6 +537,7 @@
{
/* Found it, get the process handle count */
ProcessHandleCount = HandleEntry->HandleCount--;
+ break;
}
/* Keep looping */
Author: cfinck
Date: Sun Aug 19 02:06:00 2007
New Revision: 28414
URL: http://svn.reactos.org/svn/reactos?rev=28414&view=rev
Log:
Use host_gpp instead of host_gcc for building "ssprintf.cpp" and "tools.cpp".
These are C++ files, so they should be built with g++ like it's done for the other tools. Usually they can also be built with gcc, but Collibri from IRC reported that broken gcc interfaces exist, which lead to problems with these files.
Modified:
trunk/reactos/tools/tools.mak
Modified: trunk/reactos/tools/tools.mak
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/tools.mak?rev=28414&…
==============================================================================
--- trunk/reactos/tools/tools.mak (original)
+++ trunk/reactos/tools/tools.mak Sun Aug 19 02:06:00 2007
@@ -34,11 +34,11 @@
$(TOOLS_INT_)ssprintf.o: $(TOOLS_BASE_)ssprintf.cpp $(XML_SSPRINTF_HEADERS) | $(TOOLS_INT)
$(ECHO_CC)
- ${host_gcc} $(TOOLS_CPPFLAGS) -c $< -o $@
+ ${host_gpp} $(TOOLS_CPPFLAGS) -c $< -o $@
$(TOOLS_INT_)xml.o: $(TOOLS_BASE_)xml.cpp $(XML_SSPRINTF_HEADERS) | $(TOOLS_INT)
$(ECHO_CC)
- ${host_gcc} $(TOOLS_CPPFLAGS) -c $< -o $@
+ ${host_gpp} $(TOOLS_CPPFLAGS) -c $< -o $@
include tools/bin2c.mak
include tools/bin2res/bin2res.mak