Skip Menu |

This queue is for tickets about the Tcl CPAN distribution.

Report information
The Basics
Id: 36167
Status: resolved
Priority: 0/
Queue: Tcl

People
Owner: Nobody in particular
Requestors: kjwcode [...] gmail.com
Cc:
AdminCc:

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



Subject: t/call.t tests 9 and 10 trigger an assertion on Perl 5.10 on Fedora 9
Date: Sun, 25 May 2008 01:09:38 -0700
To: bug-Tcl [...] rt.cpan.org
From: kjw <kjwcode [...] gmail.com>
When building the module on Fedora 9 (Perl 5.10) tests 9 and 10 in t/call.t trigger an assertion: ((svtype)((_svi)->sv_flags & 0xff)) >= SVt_RV failed: file Tcl.xs, line 647.
Subject: [PATCH] SvRV assertion failure in TclObjFromSv on perl5.10
Here is my patch to solve this problem, just by placing guard (SvROK) for SvRV. Attached patch also contains extended test. Worked for me on Fedora11. On Sun May 25 04:10:02 2008, kjwcode@gmail.com wrote: Show quoted text
> When building the module on Fedora 9 (Perl 5.10) tests 9 and 10 in > t/call.t trigger an assertion: > > ((svtype)((_svi)->sv_flags & 0xff)) >= SVt_RV failed: file Tcl.xs,
line 647.
diff -u -r Tcl-0.97.orig/Tcl.xs Tcl-0.97/Tcl.xs --- Tcl-0.97.orig/Tcl.xs 2008-09-07 09:21:59.000000000 +0900 +++ Tcl-0.97/Tcl.xs 2009-08-13 12:55:48.000000000 +0900 @@ -650,7 +650,7 @@ /* XXX: Is this handling refcount on NewObj right? */ Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewObj()); } else { - if ((AV *) SvRV(*svp) == av) { + if (SvROK(*svp) && ((AV *) SvRV(*svp) == av)) { /* XXX: Is this a proper check for cyclical reference? */ croak("cyclical array reference found"); abort(); diff -u -r Tcl-0.97.orig/t/result.t Tcl-0.97/t/result.t --- Tcl-0.97.orig/t/result.t 2008-09-07 09:21:59.000000000 +0900 +++ Tcl-0.97/t/result.t 2009-08-13 12:55:53.000000000 +0900 @@ -2,7 +2,7 @@ $| = 1; -print "1..5\n"; +print "1..7\n"; sub foo { my $interp = $_[1]; @@ -49,3 +49,21 @@ } else { print "ok 5\n"; } + +$i->ResetResult(); + +eval { + $i->AppendResult([[0..3], [4..7]]); +}; + +if ($@) { + print "Not ok 6\n"; +} else { + print "ok 6\n"; +} + +if ($i->result eq q{{0 1 2 3} {4 5 6 7}}) { + print "ok 7\n"; +} else { + print "Not ok 7\n"; +}
thank you very much! applied as d9fceb903fafd1da8a60dbce21df97c53c37daa8; the fix will be in 1.11