From: SourceForge.net <no...@so...> - 2008-08-01 19:40:23
|
Bugs item #2023112, was opened at 2008-07-20 20:13 Message generated for change (Comment added) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2023112&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 35. TclOO Package Group: current: 8.6a1 Status: Open Resolution: None Priority: 9 Private: No Submitted By: Daniel A. Steffen (das) Assigned to: Donal K. Fellows (dkf) Summary: oo-18.3 fails with -singleproc 1 Initial Comment: oo-18.3 fails when running the testsuite with -singleproc 1. I've tracked this down to a conflict between the tests NRE-oo.4, namespace-42.8 and oo-18.3, all three are needed to get the failure... i.e. running the testsuite with the following options gives the output below: -singleproc 1 -verbose "bet" -file "NRE.test namespace.test oo.test" \ -match "NRE-oo.4 namespace-42.8 oo-18.3" Tests running in interp: build/tcltest Tests located in: tcl/tests Tests running in: build Temporary files stored in build Test files sourced into current interpreter Running tests that match: NRE-oo.4 namespace-42.8 oo-18.3 Skipping test files that match: l.*.test Only running test files that match: NRE.test namespace.test oo.test Tests began at Mon Jul 21 01:57:46 CEST 2008 NRE.test ---- NRE-oo.4 start namespace.test ---- namespace-42.8 start oo.test ---- oo-18.3 start ==== oo-18.3 OO: define command support FAILED ==== Contents of test case: list [catch {oo::class create foo {error bar}} msg] $msg $errorInfo ---- Result was: 1 bar {bar while executing "error bar" (in definition script for object "::foo" line 1) invoked from within "return -options $opt $msg" (class "::oo::class" constructor line 6) invoked from within "oo::class create foo {error bar}"} ---- Result should have been (exact matching): 1 bar {bar while executing "error bar" (in definition script for object "::foo" line 1) invoked from within "oo::class create foo {error bar}"} ==== oo-18.3 FAILED Tests ended at Mon Jul 21 01:57:47 CEST 2008 all.tcl: Total 419 Passed 2 Skipped 416 Failed 1 Sourced 3 Test Files. Files with failing tests: oo.test ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2008-08-01 15:40 Message: Logged In: YES user_id=80530 Originator: NO Confirming that theory, replace proc demo args {}; rename demo {} with testcmdtrace tracetest {} and see the same failure. What those have in common is a bump of the compileEpoch. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2008-08-01 15:33 Message: Logged In: YES user_id=80530 Originator: NO Oops. More likely is that the proc demo args {}; rename demo {} sequence has the effect of bumping the compileEpoch. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2008-08-01 15:28 Message: Logged In: YES user_id=80530 Originator: NO Comment out line 343 of tclProc.c, ((Command *) cmd)->compileProc = TclCompileNoOp; and the test failure goes away (as well as no-op proc optimization). Suggests ugly possibility of memory corruption at the root of the problem? ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2008-08-01 14:35 Message: Logged In: YES user_id=80530 Originator: NO The proc name "demo" is irrelevant, but the argument spec and body matter. There must be some interaction with the special "compile to no instructions" procs. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2008-08-01 14:23 Message: Logged In: YES user_id=80530 Originator: NO So this interactive session demo's the bug, which appears to be within TclOO: % oo::class create foo {error bar} bar % set errorInfo bar while executing "error bar" (in definition script for object "::foo" line 1) invoked from within "oo::class create foo {error bar}" % % % oo::class create foo ::foo % foo destroy % proc demo args {} % rename demo {} % oo::class create foo {error bar} bar % set errorInfo bar while executing "error bar" (in definition script for object "::foo" line 1) invoked from within "return -options $opt $msg" (class "::oo::class" constructor line 6) invoked from within "oo::class create foo {error bar}" ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2008-08-01 14:18 Message: Logged In: YES user_id=80530 Originator: NO Probing reveals that the role of namespace-42.8 is just the command sequence: proc demo args {} rename demo {} And the role of NRE-oo.4 is just the command sequence oo::class create foo foo destroy ---------------------------------------------------------------------- Comment By: miguel sofer (msofer) Date: 2008-07-29 17:58 Message: Logged In: YES user_id=148712 Originator: NO Confirm reproducible, concur hard to explain. Relieved that it exists pre-nre, so that that's not where to look. Specifically, it exists since the very first commit of TclOO to the Tcl tree on 2008-05-31 (on my machine setting 'ulimit -s unlimited' allows the NRE tests to run to completion). ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2008-07-21 04:13 Message: Logged In: YES user_id=79902 Originator: NO Huh!? That's bizarre! (I confirm that this is reproducible.) OK, initial suspicion is something to do with representation caching and literals that is ending up allowing the error to escape the [catch] in the class constructor script. Handing off to an expert on such things for a second opinion. (I've no idea what to do about this!) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2023112&group_id=10894 |