From c832638c53db74cf02b2b8e5a884b6f0c6e73518 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Sat, 9 Aug 2008 15:32:06 +0000 Subject: [PATCH] 2008-08-09 17:31 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/vm/extrap.c * deallocate alternative signal stack on exit TOFIX: hb_vmSetExceptionHandler() / hb_vmUnsetExceptionHandler() cover only part of hb_vmInit() and not hb_vmQuit(). Their calls should be moved to external places where both hb_vmInit() and hb_vmQuit() are executed. * harbour/source/rdd/dbfcdx/dbfcdx1.c ! fixed to not respect bitmap filters when structural order is scanned, f.e. in OrdListAdd() with active bitmap filter. --- harbour/ChangeLog | 12 ++++++++++++ harbour/source/rdd/dbfcdx/dbfcdx1.c | 6 ++++-- harbour/source/vm/extrap.c | 15 ++++++++++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6bb308493f..94aaba5b43 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,18 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-08-09 17:31 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/vm/extrap.c + * deallocate alternative signal stack on exit + TOFIX: hb_vmSetExceptionHandler() / hb_vmUnsetExceptionHandler() + cover only part of hb_vmInit() and not hb_vmQuit(). Their + calls should be moved to external places where both + hb_vmInit() and hb_vmQuit() are executed. + + * harbour/source/rdd/dbfcdx/dbfcdx1.c + ! fixed to not respect bitmap filters when structural order + is scanned, f.e. in OrdListAdd() with active bitmap filter. + 2008-08-09 16:52 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * include/hbsetup.h * Refinement to HB_OS_DARWIN autodetection. diff --git a/harbour/source/rdd/dbfcdx/dbfcdx1.c b/harbour/source/rdd/dbfcdx/dbfcdx1.c index d2f1901786..198bea3ae8 100644 --- a/harbour/source/rdd/dbfcdx/dbfcdx1.c +++ b/harbour/source/rdd/dbfcdx/dbfcdx1.c @@ -3975,7 +3975,8 @@ static BOOL hb_cdxPageReadPrevKey( LPCDXPAGE pPage ) break; } } - while( !hb_cdxCheckRecordScope( pPage->TagParent->pIndex->pArea, + while( ( pPage->TagParent->OptFlags & CDX_TYPE_STRUCTURE ) == 0 && + !hb_cdxCheckRecordScope( pPage->TagParent->pIndex->pArea, hb_cdxPageGetKeyRec( pPage, pPage->iCurKey ) ) ); if( pPage->iCurKey != 0 ) hb_cdxSetCurKey( pPage ); @@ -4018,7 +4019,8 @@ static BOOL hb_cdxPageReadNextKey( LPCDXPAGE pPage ) break; } } - while( !hb_cdxCheckRecordScope( pPage->TagParent->pIndex->pArea, + while( ( pPage->TagParent->OptFlags & CDX_TYPE_STRUCTURE ) == 0 && + !hb_cdxCheckRecordScope( pPage->TagParent->pIndex->pArea, hb_cdxPageGetKeyRec( pPage, pPage->iCurKey ) ) ); if( pPage->iCurKey != 0 ) hb_cdxSetCurKey( pPage ); diff --git a/harbour/source/vm/extrap.c b/harbour/source/vm/extrap.c index f6261ded96..16d09b4d71 100644 --- a/harbour/source/vm/extrap.c +++ b/harbour/source/vm/extrap.c @@ -323,7 +323,7 @@ void hb_vmSetExceptionHandler( void ) #elif defined( HB_SIGNAL_EXCEPTION_HANDLER ) { stack_t ss; - ss.ss_sp = ( void * ) malloc( SIGSTKSZ ); + ss.ss_sp = ( void * ) hb_xgrab( SIGSTKSZ ); ss.ss_size = SIGSTKSZ; ss.ss_flags = 0; /* set alternative stack for SIGSEGV executed on stack overflow */ @@ -356,5 +356,18 @@ void hb_vmUnsetExceptionHandler( void ) rc = DosUnsetExceptionHandler( &s_regRec ); HB_SYMBOL_UNUSED( rc ); } +#elif defined( HB_SIGNAL_EXCEPTION_HANDLER ) + { + stack_t ss, oss; + ss.ss_sp = NULL; + ss.ss_size = SIGSTKSZ; + ss.ss_flags = SS_DISABLE; + /* set alternative stack for SIGSEGV executed on stack overflow */ + if( sigaltstack( &ss, &oss ) == 0 ) + { + if( oss.ss_sp && SS_DISABLE ) + hb_xfree( oss.ss_sp ); + } + } #endif }