From c9d50be3b9d31a5e6339eae35dd3b04ee3b6913f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 15 Oct 2019 14:38:11 +0000 Subject: Add more dummy stub-entries, filled with NULL. Stub table size corresponds with stub table size for 8.7, encountering NULL entries is better than accessing outside of array bounds. --- generic/tcl.decls | 2 +- generic/tclDecls.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++--- generic/tclInt.decls | 5 +++++ generic/tclIntDecls.h | 34 +++++++++++++++++++++++++++++ generic/tclStubInit.c | 29 ++++++++++++++++++++++++- 5 files changed, 125 insertions(+), 5 deletions(-) diff --git a/generic/tcl.decls b/generic/tcl.decls index 6fbf45f..f811ab6 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -2107,7 +2107,7 @@ declare 578 { declare 579 { void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr, const char *format, ...) } -declare 630 { +declare 648 { void TclUnusedStubEntry(void) } diff --git a/generic/tclDecls.h b/generic/tclDecls.h index b11c0d8..a1dbb26 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -3462,9 +3462,27 @@ EXTERN void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr, /* Slot 627 is reserved */ /* Slot 628 is reserved */ /* Slot 629 is reserved */ +/* Slot 630 is reserved */ +/* Slot 631 is reserved */ +/* Slot 632 is reserved */ +/* Slot 633 is reserved */ +/* Slot 634 is reserved */ +/* Slot 635 is reserved */ +/* Slot 636 is reserved */ +/* Slot 637 is reserved */ +/* Slot 638 is reserved */ +/* Slot 639 is reserved */ +/* Slot 640 is reserved */ +/* Slot 641 is reserved */ +/* Slot 642 is reserved */ +/* Slot 643 is reserved */ +/* Slot 644 is reserved */ +/* Slot 645 is reserved */ +/* Slot 646 is reserved */ +/* Slot 647 is reserved */ #ifndef TclUnusedStubEntry_TCL_DECLARED #define TclUnusedStubEntry_TCL_DECLARED -/* 630 */ +/* 648 */ EXTERN void TclUnusedStubEntry(void); #endif @@ -4132,7 +4150,25 @@ typedef struct TclStubs { VOID *reserved627; VOID *reserved628; VOID *reserved629; - void (*tclUnusedStubEntry) (void); /* 630 */ + VOID *reserved630; + VOID *reserved631; + VOID *reserved632; + VOID *reserved633; + VOID *reserved634; + VOID *reserved635; + VOID *reserved636; + VOID *reserved637; + VOID *reserved638; + VOID *reserved639; + VOID *reserved640; + VOID *reserved641; + VOID *reserved642; + VOID *reserved643; + VOID *reserved644; + VOID *reserved645; + VOID *reserved646; + VOID *reserved647; + void (*tclUnusedStubEntry) (void); /* 648 */ } TclStubs; extern TclStubs *tclStubsPtr; @@ -6535,9 +6571,27 @@ extern TclStubs *tclStubsPtr; /* Slot 627 is reserved */ /* Slot 628 is reserved */ /* Slot 629 is reserved */ +/* Slot 630 is reserved */ +/* Slot 631 is reserved */ +/* Slot 632 is reserved */ +/* Slot 633 is reserved */ +/* Slot 634 is reserved */ +/* Slot 635 is reserved */ +/* Slot 636 is reserved */ +/* Slot 637 is reserved */ +/* Slot 638 is reserved */ +/* Slot 639 is reserved */ +/* Slot 640 is reserved */ +/* Slot 641 is reserved */ +/* Slot 642 is reserved */ +/* Slot 643 is reserved */ +/* Slot 644 is reserved */ +/* Slot 645 is reserved */ +/* Slot 646 is reserved */ +/* Slot 647 is reserved */ #ifndef TclUnusedStubEntry #define TclUnusedStubEntry \ - (tclStubsPtr->tclUnusedStubEntry) /* 630 */ + (tclStubsPtr->tclUnusedStubEntry) /* 648 */ #endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 8acd433..2b3b89d 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -944,6 +944,11 @@ declare 249 { char *TclDoubleDigits(double dv, int ndigits, int flags, int *decpt, int *signum, char **endPtr) } + +declare 258 { + void TclUnusedStubEntry(void) +} + ############################################################################## diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index e4e85ad..6e74d36 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -1056,6 +1056,19 @@ EXTERN void TclDbDumpActiveObjects(FILE *outFile); EXTERN char * TclDoubleDigits(double dv, int ndigits, int flags, int *decpt, int *signum, char **endPtr); #endif +/* Slot 250 is reserved */ +/* Slot 251 is reserved */ +/* Slot 252 is reserved */ +/* Slot 253 is reserved */ +/* Slot 254 is reserved */ +/* Slot 255 is reserved */ +/* Slot 256 is reserved */ +/* Slot 257 is reserved */ +#ifndef TclUnusedStubEntry_TCL_DECLARED +#define TclUnusedStubEntry_TCL_DECLARED +/* 258 */ +EXTERN void TclUnusedStubEntry(void); +#endif typedef struct TclIntStubs { int magic; @@ -1311,6 +1324,15 @@ typedef struct TclIntStubs { VOID *reserved247; VOID *reserved248; char * (*tclDoubleDigits) (double dv, int ndigits, int flags, int *decpt, int *signum, char **endPtr); /* 249 */ + VOID *reserved250; + VOID *reserved251; + VOID *reserved252; + VOID *reserved253; + VOID *reserved254; + VOID *reserved255; + VOID *reserved256; + VOID *reserved257; + void (*tclUnusedStubEntry) (void); /* 258 */ } TclIntStubs; extern TclIntStubs *tclIntStubsPtr; @@ -2040,6 +2062,18 @@ extern TclIntStubs *tclIntStubsPtr; #define TclDoubleDigits \ (tclIntStubsPtr->tclDoubleDigits) /* 249 */ #endif +/* Slot 250 is reserved */ +/* Slot 251 is reserved */ +/* Slot 252 is reserved */ +/* Slot 253 is reserved */ +/* Slot 254 is reserved */ +/* Slot 255 is reserved */ +/* Slot 256 is reserved */ +/* Slot 257 is reserved */ +#ifndef TclUnusedStubEntry +#define TclUnusedStubEntry \ + (tclIntStubsPtr->tclUnusedStubEntry) /* 258 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 6499bc2..9b1562c 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -550,6 +550,15 @@ TclIntStubs tclIntStubs = { NULL, /* 247 */ NULL, /* 248 */ TclDoubleDigits, /* 249 */ + NULL, /* 250 */ + NULL, /* 251 */ + NULL, /* 252 */ + NULL, /* 253 */ + NULL, /* 254 */ + NULL, /* 255 */ + NULL, /* 256 */ + NULL, /* 257 */ + TclUnusedStubEntry, /* 258 */ }; TclIntPlatStubs tclIntPlatStubs = { @@ -1398,7 +1407,25 @@ TclStubs tclStubs = { NULL, /* 627 */ NULL, /* 628 */ NULL, /* 629 */ - TclUnusedStubEntry, /* 630 */ + NULL, /* 630 */ + NULL, /* 631 */ + NULL, /* 632 */ + NULL, /* 633 */ + NULL, /* 634 */ + NULL, /* 635 */ + NULL, /* 636 */ + NULL, /* 637 */ + NULL, /* 638 */ + NULL, /* 639 */ + NULL, /* 640 */ + NULL, /* 641 */ + NULL, /* 642 */ + NULL, /* 643 */ + NULL, /* 644 */ + NULL, /* 645 */ + NULL, /* 646 */ + NULL, /* 647 */ + TclUnusedStubEntry, /* 648 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12