Tcl Source Code

View Ticket
Login
Ticket UUID: 1860425
Title: core dump on FreeBSD, thread::create
Type: Bug Version: obsolete: 8.5.0
Submitter: juliannoble Created on: 2007-12-29 15:21:55
Subsystem: 80. Thread Package Assigned To: msofer
Priority: 9 Immediate Severity:
Status: Closed Last Modified: 2008-01-11 17:55:12
Resolution: Fixed Closed By: msofer
    Closed on: 2008-01-11 10:55:12
Description:
cvs checkout from 2007-12-22
thread enabled build.
FreeBSD 6.2

%package require Thread
2.6.5
%thread::create {}
tclsh in free(): error: junk pointer, too high to make sense



This problem doesn't occur on 8.5a7 or 8.5b3 built the same way.
User Comments: msofer added on 2008-01-11 17:55:11:
Logged In: YES 
user_id=148712
Originator: NO

The failure is stack-3.1 is relatet but different, probably the same as #1850424, the other that

juliannoble added on 2008-01-11 11:19:37:
Logged In: YES 
user_id=598324
Originator: YES

Yes, the attached tclUnixThrd.diff fixed it.

'make test' output looks reasonable except for stack-3.1 failed
errorCode: CHILDKILLED 71901 SIGBUS {bus error}

Sorry - I don't know if that's related - but despite that test faluire,
so far this version of Tcl seems to work ok for my apps.

msofer added on 2008-01-11 03:37:05:

File Added - 261705: tclUnixThrd.diff

Logged In: YES 
user_id=148712
Originator: NO

Could you please test if the attached patch fixes the issue?
File Added: tclUnixThrd.diff

[email protected] added on 2008-01-10 23:00:36:
Logged In: NO 

After undoing the changes made to tclUnixThrd.c etc in the update below, the error doesn't occur.

Revision 1.54 - (download) (annotate) 
Mon Nov 26 19:11:13 2007 UTC (6 weeks, 2 days ago) by msofer 
Branch: MAIN 
* generic/tclBasic.c:
* generic/tclInt.h:
* unix/tclUnixInit.c:
* unix/tclUnixThrd.c: Fix stack checking via workaround for bug in
glibc's pthread_attr_get_np, patch from [Bug 1815573]. Many thanks
to Sergei Golovan (aka Teo) for detecting the bug and helping
diagnose and develop the fix.

Attachments: