[ros-dev] Re: [ros-diffs] [hbirr] 16714: - Removed R_EXTRA_STACK because R_EXTRA_STACK and R_STACK must have the same size.

Royce Mitchell III royce3 at ev1.net
Tue Jul 26 11:47:30 CEST 2005


hbirr at svn.reactos.com wrote:

>- Initialized an allocated block completely before release the lock.
>
>@@ -719,9 +725,9 @@
>  
>
> 	{
> 		if ( (NewBlock = RQueRemove ( &pool->Que[que][align] )) )
> 		{
>  
>
>-			R_RELEASE_MUTEX(pool);
>  
>
> 			RiUsedInit ( NewBlock, Tag );
> 			RiUsedInitRedZone ( NewBlock, NumberOfBytes );
>  
>
>+			R_RELEASE_MUTEX(pool);
>  
>
> 			return RHdrToBody(NewBlock);
> 		}
> 		queBytes = 16 << que;
>@@ -865,11 +871,10 @@
>  
>
> 	NewBlock = (PR_USED)BestBlock;
> 	RiUsedInit ( NewBlock, Tag );
> 
>  
>
>-	R_RELEASE_MUTEX(pool);
>-
>  
>
> 	/*  RtlZeroMemory(RHdrToBody(NewBlock), NumberOfBytes);*/
> 
> 	RiUsedInitRedZone ( NewBlock, NumberOfBytes );
>  
>
>+	R_RELEASE_MUTEX(pool);
>  
>
> 
> 	return RHdrToBody(NewBlock);
> }
>  
>
Hartmut,

If you don't mind, I'm curious how this was causing a problem, the stuff 
that was being initialized outside of the lock shouldn't (in my feeble 
mind) have been "visible" upon reentry until this block is freed again.

Thanks,

Royce


More information about the Ros-dev mailing list