ChangeLog 2001-01-09 16:15 UTC+0100

This commit is contained in:
Ryszard Glab
2001-01-09 15:10:35 +00:00
parent cdd92a551c
commit 4370282dd8
4 changed files with 40 additions and 11 deletions

View File

@@ -1,3 +1,19 @@
2001-01-09 16:15 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
*source/rdd/workarea.c
*codeblocks used in SET LOCATE are properly locked/unlocked
to prevent deallocation by the GC
(thanks to shashkov@orel.ru)
*source/vm/macro.c
*fixed bug in hb_macroTextSubst() (result buffer reallocation)
(thanks to shashkov@orel.ru)
*source/vm/memvars.c
*fixed access of uninitialized memvar values
(thanks to shashkov@orel.ru)
2001-01-08 17:45 UTC-0800 Ron Pinkas <ron@profit-master.com>
* source/pp/ppcore.c
! Fixed ')' as expression terminator in state STATE_ID_END

View File

@@ -852,6 +852,7 @@ ERRCODE hb_waClearLocate( AREAP pArea )
/* Free all items */
if( pArea->dbsi.itmCobFor )
{
hb_gcUnlockItem( pArea->dbsi.itmCobFor );
hb_itemRelease( pArea->dbsi.itmCobFor );
pArea->dbsi.itmCobFor = NULL;
}
@@ -862,6 +863,7 @@ ERRCODE hb_waClearLocate( AREAP pArea )
}
if( pArea->dbsi.itmCobWhile )
{
hb_gcUnlockItem( pArea->dbsi.itmCobWhile );
hb_itemRelease( pArea->dbsi.itmCobWhile );
pArea->dbsi.itmCobWhile = NULL;
}
@@ -935,13 +937,19 @@ ERRCODE hb_waSetLocate( AREAP pArea, LPDBSCOPEINFO pScopeInfo )
SELF_CLEARLOCATE( pArea );
if( pScopeInfo->itmCobFor )
{
pArea->dbsi.itmCobFor = hb_itemNew( pScopeInfo->itmCobFor );
hb_gcLockItem( pArea->dbsi.itmCobFor );
}
if( pScopeInfo->lpstrFor )
pArea->dbsi.lpstrFor = hb_itemNew( pScopeInfo->lpstrFor );
if( pScopeInfo->itmCobWhile )
{
pArea->dbsi.itmCobWhile = hb_itemNew( pScopeInfo->itmCobWhile );
hb_gcLockItem( pArea->dbsi.itmCobWhile );
}
if( pScopeInfo->lpstrWhile )
pArea->dbsi.lpstrWhile = hb_itemNew( pScopeInfo->lpstrWhile );
@@ -970,7 +978,7 @@ ERRCODE hb_waCompile( AREAP pArea, BYTE * pExpr )
pMacro = hb_macroCompile( ( char * ) pExpr );
if( pMacro )
{
hb_itemPutPtr( pArea->valResult, ( void * ) pMacro );
pArea->valResult = hb_itemPutPtr( pArea->valResult, ( void * ) pMacro );
return SUCCESS;
}
else

View File

@@ -353,8 +353,12 @@ char * hb_macroTextSubst( char * szString, ULONG *pulStringLen )
ulResStrLen += ( ulValLen - ulNameLen );
if( ulResStrLen > ulResBufLen )
{
ULONG ulHead = pHead - szResult;
ULONG ulTail = pTail - szResult;
ulResBufLen = ulResStrLen;
szResult = ( char * ) hb_xrealloc( szResult, ulResBufLen + 1 );
pHead = szResult + ulHead;
pTail = szResult + ulTail;
}
}
else

View File

@@ -107,14 +107,13 @@ void hb_memvarsRelease( void )
if( s_globalTable )
{
while( ulCnt )
while( --ulCnt )
{
if( s_globalTable[ ulCnt ].counter && s_globalTable[ ulCnt ].hPrevMemvar != ( HB_HANDLE )-1 )
{
hb_itemClear( &s_globalTable[ ulCnt ].item );
s_globalTable[ ulCnt ].counter = 0;
}
--ulCnt;
}
}
}
@@ -271,12 +270,15 @@ void hb_memvarSetPrivatesBase( ULONG ulBase )
{
--s_privateStackCnt;
hVar = s_privateStack[ s_privateStackCnt ]->hMemvar;
hOldValue = s_globalTable[ hVar ].hPrevMemvar;
hb_memvarValueDecRef( hVar );
/*
* Restore previous value for variables that were overridden
*/
s_privateStack[ s_privateStackCnt ]->hMemvar = hOldValue;
if( hVar )
{
hOldValue = s_globalTable[ hVar ].hPrevMemvar;
hb_memvarValueDecRef( hVar );
/*
* Restore previous value for variables that were overridden
*/
s_privateStack[ s_privateStackCnt ]->hMemvar = hOldValue;
}
}
s_privateStackBase = ulBase;
}
@@ -1506,7 +1508,7 @@ void hb_memvarsIsMemvarRef( void )
{
ULONG ulCnt = s_globalLastFree;
while( ulCnt )
while( --ulCnt )
{
/* do not check detached variables - for these variables only
* references from the eval stack are meaningfull for the GC
@@ -1515,7 +1517,6 @@ void hb_memvarsIsMemvarRef( void )
{
hb_gcItemRef( &s_globalTable[ ulCnt ].item );
}
--ulCnt;
}
}
}