Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Crash when joining multiple threads
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jeff Clites  
View profile  
 More options Jan 5 2004, 5:49 am
Newsgroups: perl.perl6.internals
From: jcli...@mac.com (Jeff Clites)
Date: Mon, 5 Jan 2004 02:05:42 -0800
Local: Mon, Jan 5 2004 5:05 am
Subject: Crash when joining multiple threads
If I run this code, which should just be a loop which
creates-then-joins a thread (looping twice), I get a crash at the end:

     set I16, 0
again:
     inc I16
     new P5, .ParrotThread
     find_global P6, "_foo"
     find_method P0, P5, "thread3"
     invoke
     set I5, P5
     getinterp P2
     find_method P0, P2, "join"
     invoke
     lt I16, 2, again
     print "done\n"
     end

.pcc_sub _foo:
     invoke P1

The problem is that when joining the _second_ time, in pt_thread_join()
you get a return value from joining the thread--which happens to
contain a thread-interpreter PMC:

(gdb) p (char*)((PMC*)retval)->vtable->isa_str->strstart
$2 = 0x1dc40c "ParrotThread ParrotInterpreter"

This then gets cloned, which ultimately ends up messing up the
interpreter_array[] (things end up in the wrong slot), and
pt_join_threads() ends up trying to join a bogus thread, and you get a
crash.

So, the bug seems to be that the second time through, you get a return
value from the thread. I don't know why this is happening--haven't
tried digging yet.

JEff


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.