[svn:parrot] r41239 - in trunk: src/pmc t/pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Sat Sep 12 18:51:06 UTC 2009
Author: NotFound
Date: Sat Sep 12 18:51:03 2009
New Revision: 41239
URL: https://trac.parrot.org/parrot/changeset/41239
Log:
[threads] Fix a test that segfaulted (still fails, but now for the correct reason) and the function that allowed this fail pass unnoticed
Modified:
trunk/src/pmc/parrotthread.pmc
trunk/t/pmc/threads.t
Modified: trunk/src/pmc/parrotthread.pmc
==============================================================================
--- trunk/src/pmc/parrotthread.pmc Sat Sep 12 17:46:59 2009 (r41238)
+++ trunk/src/pmc/parrotthread.pmc Sat Sep 12 18:51:03 2009 (r41239)
@@ -63,6 +63,11 @@
INTVAL clone_flags, PMC *sub, PMC *args) {
INTVAL tid = VTABLE_get_integer(interp, thread);
+ if (PMC_IS_NULL(sub)) {
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
+ "Invalid thread sub");
+ }
+
clone_interpreter(PMC_interp(thread), interp, clone_flags);
interp->flags &= ~PARROT_THR_COPY_INTERP; /* XXX */
Modified: trunk/t/pmc/threads.t
==============================================================================
--- trunk/t/pmc/threads.t Sat Sep 12 17:46:59 2009 (r41238)
+++ trunk/t/pmc/threads.t Sat Sep 12 18:51:03 2009 (r41239)
@@ -508,7 +508,7 @@
.local pmc thread
thread = new ['ParrotThread']
.local pmc _thread_func
- _thread_func = get_global ['main'], 'thread_test_func'
+ _thread_func = get_hll_global ['main'], 'thread_test_func'
$I0 = .PARROT_CLONE_CODE
bor $I0, $I0, .PARROT_CLONE_CLASSES
print "in thread:\n"
More information about the parrot-commits
mailing list