[Pkg-tcltk-devel] Bug#487549: Bug#487549: tcLex segfaults under tcl8.5 (in transcriber)
Sergei Golovan
sgolovan at nes.ru
Sun Jun 22 17:02:48 UTC 2008
On 6/22/08, Stephen McCamant <smcc at csail.mit.edu> wrote:
>
> When I try to run transcriber, which uses tcLex, under a version 8.5
> Tcl/Tk wish, it segfaults. If a file is specified on the command line,
> it crashes immediately; otherwise it opens a file chooser and then
> crashes after you choose a file. (I suspect that this is the same
> failure behind transcriber bug #484738, though it's hard to be sure
> because there aren't any details of the failure in that report.)
The problem is likely caused by the differences in TclRegexp structure
for Tcl 8.4 and Tcl 8.5 (this structure is internal though used by
tcLex).
In Tcl 8.4 (/usr/include/tcl8.4/tcl-private/generic/tclRegexp.h):
typedef struct TclRegexp {
int flags;
regex_t re;
CONST char *string;
Tcl_Obj *objPtr;
regmatch_t *matches;
rm_detail_t details;
int refCount;
} TclRegexp;
In Tcl 8.5 (/usr/include/tcl8.5/tcl-private/generic/tclRegexp.h):
typedef struct TclRegexp {
int flags;
regex_t re;
CONST char *string;
Tcl_Obj *objPtr;
Tcl_Obj *globObjPtr; /* This field is new */
regmatch_t *matches;
rm_detail_t details;
int refCount;
} TclRegexp;
So, tcLex won't work for both 8.4 and 8.5. I think the best I can do
(while Tcl 8.4 is the default) is to check for 8.5 and refuse loading.
--
Sergei Golovan
More information about the Pkg-tcltk-devel
mailing list