Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 13640
Status: resolved
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: ext-dirk.heinrichs [...] nokia.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 804.027
Fixed in: (no value)



Subject: Many tests fail with core dumps on solaris 2.9
I get the following test results when I do "make test" for Tk-804.027 on Solaris 2.9 (Sparc). Perl is 5.8.6, compiler is gcc 3.4.3, both built from OpenPKG packages. t/after......................ok t/autoload...................ok t/balloon....................ok t/browseentry-grabtest.......ok t/browseentry-subclassing....dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core after all the subtests completed successfully t/browseentry................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED tests 8-15 Failed 8/15 tests, 46.67% okay t/browseentry2...............ok t/button.....................ok t/create.....................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED tests 11-528 Failed 518/528 tests, 1.89% okay t/cursor.....................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED tests 1-7 Failed 7/7 tests, 0.00% okay t/dash.......................ok t/dialogbox..................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED tests 3-8 Failed 6/8 tests, 25.00% okay t/entry......................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED tests 3-336 Failed 334/336 tests, 0.60% okay t/fbox.......................ok t/fileevent..................ok t/fileselect.................ok t/font.......................ok t/fork.......................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay t/geomgr.....................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED tests 2-19 Failed 18/19 tests, 5.26% okay t/iso8859-1..................ok t/JP.........................skipped all skipped: locale's 'iso-8859-1' cannot represent Japanese. t/KR.........................skipped all skipped: locale's 'iso-8859-1' cannot represent Korean. t/leak.......................ok t/list.......................ok t/listbox....................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED tests 1-437 Failed 437/437 tests, 0.00% okay t/listvar....................ok t/magic......................ok t/mega.......................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED tests 2-8 Failed 7/8 tests, 12.50% okay t/mwm........................ok t/optmenu....................ok t/photo......................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED tests 2-100 Failed 99/100 tests, 1.00% okay t/pixmap.....................ok t/progbar....................ok t/regexp.....................ok t/Require....................ok t/slaves.....................ok t/Trace......................ok t/trace1.....................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED tests 3-17 Failed 15/17 tests, 11.76% okay t/widget.....................ok t/wm-time....................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED tests 1-6 Failed 6/6 tests, 0.00% okay t/wm.........................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay t/X..........................ok t/zzHList....................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED tests 5-23 Failed 19/23 tests, 17.39% okay t/zzPhoto....................ok t/zzScrolled.................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED tests 5-94 Failed 90/94 tests, 4.26% okay t/zzText.....................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED tests 9-22 Failed 14/22 tests, 36.36% okay t/zzTixGrid..................dubious Test returned status 0 (wstat 138, 0x8a) test program seems to have generated a core DIED. FAILED tests 7-33 Failed 27/33 tests, 18.18% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/browseentry-subclassing.t 0 138 2 0 0.00% ?? t/browseentry.t 0 138 15 16 106.67% 8-15 t/create.t 0 138 528 1036 196.21% 11-528 t/cursor.t 0 138 7 14 200.00% 1-7 t/dialogbox.t 0 138 8 12 150.00% 3-8 t/entry.t 0 138 336 668 198.81% 3-336 t/fork.t 0 138 1 2 200.00% 1 t/geomgr.t 0 138 19 36 189.47% 2-19 t/listbox.t 0 138 437 874 200.00% 1-437 t/mega.t 0 138 8 14 175.00% 2-8 t/photo.t 0 138 100 198 198.00% 2-100 t/trace1.t 0 138 17 30 176.47% 3-17 t/wm-time.t 0 138 6 12 200.00% 1-6 t/wm.t 0 138 1 2 200.00% 1 t/zzHList.t 0 138 23 38 165.22% 5-23 t/zzScrolled.t 0 138 94 180 191.49% 5-94 t/zzText.t 0 138 22 28 127.27% 9-22 t/zzTixGrid.t 0 138 33 54 163.64% 7-33 2 tests skipped. Failed 18/47 test scripts, 61.70% okay. 1607/2054 subtests failed, 21.76% okay. make: *** [test_dynamic] Error 255
From: schupp [...] argumentum.de
A patch for this longstanding bug was recently posted to comp.lang.perl.tk, see http://groups-beta.google.com/group/comp.lang.perl.tk/browse_frm/thread/fba7201255893385/ee17c707f32ae8e1#ee17c707f32ae8e1 I've attached the patch originally from Bradford C. Smith <bradford.smith AT usermail.com>. The problem is corruption of SP in Tcl_UtfToExternalDString in encGlue.c: char * Tcl_UtfToExternalDString(Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr) { dTHX; dSP; <---------- SP fetched SV *sv; char *s = ""; STRLEN len = 0; SV *fallback = get_sv("Tk::encodeFallback",0); Tcl_DStringInit(dsPtr); if (!encoding) encoding = GetSystemEncoding(); if (!src) srcLen = 0; if (srcLen < 0) srcLen = strlen(src); if (srcLen) { int count; ENTER; SAVETMPS; PUSHMARK(sp); <-------- SP used Note that between the point where SP is fetched and where it is used, there's a call to GetSystemEncoding which might call Tcl_GetEncoding which might do perl_call_method which might change SP. (s/might/does/g reproducably on Solaris 9, but this is not platform specific.) This bug is also likely the cause of #5812 https://rt.cpan.org/NoAuth/Bug.html?id=5812 Cheers, Roderich
--- Tk-804.027/encGlue.c.orig 2005-07-25 15:53:26.750484000 +0200 +++ Tk-804.027/encGlue.c 2005-07-26 13:29:23.438824000 +0200 @@ -811,7 +811,6 @@ Tcl_UtfToExternalDString(Tcl_Encoding en int srcLen, Tcl_DString * dsPtr) { dTHX; - dSP; SV *sv; char *s = ""; STRLEN len = 0; @@ -826,6 +825,7 @@ Tcl_UtfToExternalDString(Tcl_Encoding en srcLen = strlen(src); if (srcLen) { + dSP; int count; ENTER; SAVETMPS; @@ -854,7 +854,7 @@ Tcl_UtfToExternalDString(Tcl_Encoding en FREETMPS; LEAVE; } - else +else { Tcl_DStringAppend(dsPtr,"\0",1); }
Root cause anlysis was fine. My sources have a different fix. The code near point of patch look like: dSP; SV *sv; char *s = ""; STRLEN len = 0; SV *fallback = get_sv("Tk::encodeFallback",0); Tcl_DStringInit(dsPtr); if (!encoding) { encoding = GetSystemEncoding(); SPAGAIN; } if (!src) srcLen = 0; if (srcLen < 0) srcLen = strlen(src); if (srcLen) { int count; ENTER; The SPAGAIN achieves same effect as delaying the dSP.