2020-03-24 23:34 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* config/linux/clang.mk
! fixed rule for dynamic library
* src/3rd/png/Makefile
+ added -DPNG_ARM_NEON_OPT=0 to build flags
* contrib/3rd/sqlite3/sqlite3.c
* contrib/3rd/sqlite3/sqlite3.diff
! pacified warning
* contrib/gtwvg/gtwvgd.c
* contrib/gtwvg/wvgwing.c
! fixed missing break/return in case statements - please verify it.
* contrib/hbct/dattime3.c
* added #define _DEFAULT_SOURCE necessay in new Linux distors
* contrib/hblzf/3rd/liblzf/liblzf.diff
* contrib/hblzf/3rd/liblzf/lzfP.h
* do not use nested #define in #if statements - some C compilers do not
support it
* contrib/hbssl/bio.c
! tuned #if condition
* contrib/hbmisc/hbeditc.c
* simpliefied for condition and pacified warning
* contrib/hbodbc/hbodbc.hbp
* contrib/sddodbc/sddodbc.hbp
+ added check for iodbc library
* utils/hbmk2/hbmk2.prg
+ added support for clang in android builds
* include/hbdefs.h
+ added check for __BYTE_ORDER__ macro used in some new lib C
implementations
* include/hbapi.h
* include/hbdefs.h
* include/hbstack.h
* include/hbvmpub.h
* src/vm/classes.c
* src/vm/dynsym.c
* src/vm/estack.c
* src/vm/memvars.c
+ extended the size of dynamic symbol table from 65535 to 4294967295.
Adopting class code I decided to keep current algorithm of method indexes
hashing with only some minor modifications. It's very fast anyhow it may
cause noticeable (though static) quite big memory allocation for class
definitions in applications using millions of symbols and which increase
dynamic symbol table at runtime loading new classes dynamically form .hrb,
.dll, .so or other dynamic libraries supported by Harbour. It's random
and rather impossible to exploit situation in real life anyhow I cannot
exclude it so I'd like to report it in ChangeLog. The solution is very
simple, i.e. it's enough to use classic divide et impera algorithm using
symbol numbers to find method definition anyhow it will be slower then
current one and address only very seldom hypothetical situations so I
decided to not implement it. Such static memory cost begins to be
completely unimportant in the world of 64-bit architectures and extremely
big memory address space.
The modification was sponsored by TRES company.
* src/vm/estack.c
! fixed __mvClear() in MT builds - due to stupid typo GetList variable
was removed in MT programs by CLEAR MEMORY command (__mvClear())
So far noone reported it and I've found it analyzing the code before
increasing symbol table size.
* contrib/hbwin/hbolesrv.c
* updated for new size of dynamic symbol table
This commit is contained in:
@@ -1040,8 +1040,8 @@ extern HB_EXPORT HB_BOOL hb_dynsymIsFunction( PHB_DYNS pDynSym );
|
||||
extern HB_EXPORT HB_BOOL hb_dynsymIsMemvar( PHB_DYNS pDynSym );
|
||||
extern HB_EXPORT int hb_dynsymAreaHandle( PHB_DYNS pDynSym ); /* return work area number bound with given dynamic symbol */
|
||||
extern HB_EXPORT void hb_dynsymSetAreaHandle( PHB_DYNS pDynSym, int iArea ); /* set work area number for a given dynamic symbol */
|
||||
extern HB_EXPORT int hb_dynsymToNum( PHB_DYNS pDynSym );
|
||||
extern HB_EXPORT PHB_DYNS hb_dynsymFromNum( int iSymNum );
|
||||
extern HB_EXPORT HB_SYMCNT hb_dynsymToNum( PHB_DYNS pDynSym );
|
||||
extern HB_EXPORT PHB_DYNS hb_dynsymFromNum( HB_SYMCNT iSymNum );
|
||||
#ifdef _HB_API_INTERNAL_
|
||||
extern PHB_ITEM hb_dynsymGetMemvar( PHB_DYNS pDynSym ); /* return memvar handle number bound with given dynamic symbol */
|
||||
extern void hb_dynsymSetMemvar( PHB_DYNS pDynSym, PHB_ITEM pMemvar ); /* set memvar handle for a given dynamic symbol */
|
||||
|
||||
@@ -466,6 +466,8 @@ typedef HB_UCHAR HB_U8;
|
||||
typedef HB_MAXINT HB_VMMAXINT;
|
||||
typedef HB_MAXUINT HB_VMMAXUINT;
|
||||
|
||||
typedef HB_U32 HB_SYMCNT;
|
||||
|
||||
#define HB_DBL_LIM_INT(d) ( HB_VMINT_MIN <= (d) && (d) <= HB_VMINT_MAX )
|
||||
#define HB_DBL_LIM_LONG(d) ( (HB_MAXDBL) HB_VMLONG_MIN <= (HB_MAXDBL) (d) && (HB_MAXDBL) (d) <= (HB_MAXDBL) HB_VMLONG_MAX )
|
||||
#define HB_LIM_INT(l) ( HB_VMINT_MIN <= (l) && (l) <= HB_VMINT_MAX )
|
||||
@@ -669,19 +671,22 @@ typedef HB_U32 HB_FATTR;
|
||||
|
||||
# define HB_BIG_ENDIAN
|
||||
|
||||
# elif ( defined( __BYTE_ORDER ) && defined( __LITTLE_ENDIAN ) && __BYTE_ORDER == __LITTLE_ENDIAN ) || \
|
||||
# elif ( defined( __BYTE_ORDER__ ) && defined( __LITTLE_ENDIAN__ ) && __BYTE_ORDER__ == __LITTLE_ENDIAN__ ) || \
|
||||
( defined( __BYTE_ORDER ) && defined( __LITTLE_ENDIAN ) && __BYTE_ORDER == __LITTLE_ENDIAN ) || \
|
||||
( defined( _BYTE_ORDER ) && defined( _LITTLE_ENDIAN ) && _BYTE_ORDER == _LITTLE_ENDIAN ) || \
|
||||
( defined( BYTE_ORDER ) && defined( LITTLE_ENDIAN ) && BYTE_ORDER == LITTLE_ENDIAN )
|
||||
|
||||
# define HB_LITTLE_ENDIAN
|
||||
|
||||
# elif ( defined( __BYTE_ORDER ) && defined( __BIG_ENDIAN ) && __BYTE_ORDER == __BIG_ENDIAN ) || \
|
||||
# elif ( defined( __BYTE_ORDER__ ) && defined( __BIG_ENDIAN__ ) && __BYTE_ORDER__ == __BIG_ENDIAN__ ) || \
|
||||
( defined( __BYTE_ORDER ) && defined( __BIG_ENDIAN ) && __BYTE_ORDER == __BIG_ENDIAN ) || \
|
||||
( defined( _BYTE_ORDER ) && defined( _BIG_ENDIAN ) && _BYTE_ORDER == _BIG_ENDIAN ) || \
|
||||
( defined( BYTE_ORDER ) && defined( BIG_ENDIAN ) && BYTE_ORDER == BIG_ENDIAN )
|
||||
|
||||
# define HB_BIG_ENDIAN
|
||||
|
||||
# elif ( defined( __BYTE_ORDER ) && defined( __PDP_ENDIAN ) && __BYTE_ORDER == __PDP_ENDIAN ) || \
|
||||
# elif ( defined( __BYTE_ORDER__ ) && defined( __PDP_ENDIAN__ ) && __BYTE_ORDER__ == __PDP_ENDIAN__ ) || \
|
||||
( defined( __BYTE_ORDER ) && defined( __PDP_ENDIAN ) && __BYTE_ORDER == __PDP_ENDIAN ) || \
|
||||
( defined( _BYTE_ORDER ) && defined( _PDP_ENDIAN ) && _BYTE_ORDER == _PDP_ENDIAN ) || \
|
||||
( defined( BYTE_ORDER ) && defined( PDP_ENDIAN ) && BYTE_ORDER == PDP_ENDIAN )
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ typedef struct
|
||||
#if defined( HB_MT_VM )
|
||||
int iUnlocked; /* counter for nested hb_vmUnlock() calls */
|
||||
PHB_DYN_HANDLES pDynH; /* dynamic symbol handles */
|
||||
int iDynH; /* number of dynamic symbol handles */
|
||||
HB_SYMCNT uiDynH; /* number of dynamic symbol handles */
|
||||
void * pStackLst; /* this stack entry in stack linked list */
|
||||
HB_IOERRORS IOErrors; /* MT safe buffer for IO errors */
|
||||
HB_TRACEINFO traceInfo; /* MT safe buffer for HB_TRACE data */
|
||||
@@ -359,8 +359,8 @@ extern void hb_stackUpdateAllocator( void *, PHB_ALLOCUPDT_FUNC, int );
|
||||
extern void hb_stackListSet( void * pStackLst );
|
||||
extern void hb_stackIdSetActionRequest( void * pStackID, HB_USHORT uiAction );
|
||||
extern PHB_DYN_HANDLES hb_stackGetDynHandle( PHB_DYNS pDynSym );
|
||||
extern int hb_stackDynHandlesCount( void );
|
||||
extern void hb_stackClearMemvars( int );
|
||||
extern HB_SYMCNT hb_stackDynHandlesCount( void );
|
||||
extern void hb_stackClearMemvars( HB_SYMCNT );
|
||||
extern HB_BOOL hb_stackQuitState( void );
|
||||
extern void hb_stackSetQuitState( HB_USHORT uiState );
|
||||
extern int hb_stackUnlock( void );
|
||||
@@ -409,7 +409,7 @@ extern void hb_stackUpdateAllocator( void *, PHB_ALLOCUPDT_FUNC, int );
|
||||
#if defined( HB_MT_VM )
|
||||
# define hb_stackList() ( hb_stack.pStackLst )
|
||||
# define hb_stackListSet( p ) do { hb_stack.pStackLst = ( p ); } while( 0 )
|
||||
# define hb_stackDynHandlesCount() ( hb_stack.iDynH )
|
||||
# define hb_stackDynHandlesCount() ( hb_stack.uiDynH )
|
||||
# define hb_stackQuitState( ) ( hb_stack.uiQuitState != 0 )
|
||||
# define hb_stackSetQuitState( n ) do { hb_stack.uiQuitState = ( n ); } while( 0 )
|
||||
# define hb_stackUnlock() ( ++hb_stack.iUnlocked )
|
||||
|
||||
@@ -135,7 +135,7 @@ struct _HB_SYMB;
|
||||
void * pMemvar; /* memvar pointer ( publics & privates ) */
|
||||
HB_USHORT uiArea; /* Workarea number */
|
||||
# endif /* ! HB_MT_VM */
|
||||
HB_USHORT uiSymNum; /* dynamic symbol number */
|
||||
HB_SYMCNT uiSymNum; /* dynamic symbol number */
|
||||
# if ! defined( HB_NO_PROFILER )
|
||||
HB_ULONG ulCalls; /* profiler support */
|
||||
HB_ULONG ulTime; /* profiler support */
|
||||
|
||||
Reference in New Issue
Block a user