From 289b2781681f8116ff2540bdffc717fc78f39fae Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 11 Jan 2008 10:54:48 +0000 Subject: * unix/tclUnixThrd.c (TclpThreadGetStackSize): fix for crash in freebsd [Bug 1860425]. --- ChangeLog | 5 +++++ unix/tclUnixThrd.c | 11 ++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 532cd00..7ff3c65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-01-11 Miguel Sofer + + * unix/tclUnixThrd.c (TclpThreadGetStackSize): fix for crash in + freebsd [Bug 1860425]. + 2008-01-10 Don Porter * generic/tclStringObj.c (Tcl_AppendFormatToObj): Correct failure to diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 99351a9..dfed046 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixThrd.c,v 1.55 2007/12/13 15:28:42 dgp Exp $ + * RCS: @(#) $Id: tclUnixThrd.c,v 1.56 2008/01/11 10:54:49 msofer Exp $ */ #include "tclInt.h" @@ -253,14 +253,11 @@ TclpThreadGetStackSize(void) if (!initialized) { initialized = 1; -#if 0 - if (pthread_attr_init(&threadAttr) != 0) { - return 0; - } -#else return 0; -#endif } else { + if (pthread_attr_init(&threadAttr) != 0) { + return -1; + } if (TclpPthreadGetAttrs(pthread_self(), &threadAttr) != 0) { pthread_attr_destroy(&threadAttr); return (size_t)-1; -- cgit v0.12