Will Coleda wrote:

Not only that does that avoid the segfault, the tcl spec test
equivalent to the first test passes. Woot.

The second is still failing, but probably due to unicode issues - but
it's now just failing, not segfaulting.

Once we get a core parrot test for this, we can close out the ticket. Thanks!



I tried writing a test to exercise this, but the test fails and I have no idea why. I've attached the patch for anyone who cares to add sufficient magic to make the test pass.

It'd also be nice if these tests could be refactored to more explicit about failures. The test added by the patch fails, but also fails to give any indication why it failed.

Having the test pass is be good enough for now, but the operation of t/op/sprintf.t should eventually be made more transparent.
Index: t/op/sprintf.t
===================================================================
--- t/op/sprintf.t	(revision 29736)
+++ t/op/sprintf.t	(working copy)
@@ -57,7 +57,7 @@
 =cut
 
 
-.const int TESTS = 308
+.const int TESTS = 309
 
 .sub main :main
     load_bytecode 'Test/Builder.pir'
Index: t/op/sprintf_tests
===================================================================
--- t/op/sprintf_tests	(revision 29736)
+++ t/op/sprintf_tests	(working copy)
@@ -307,5 +307,6 @@
 %#x	0	0
 %2147483647$v2d	''	
 %*2147483647$v2d	''	 UNINIT
+%*c		[-1, 65]		A		#57260 - shouldn't cause segfault
 
 # vim: sw=4 et

Reply via email to