On Friday, February 22, 2008 10:50 PM [EMAIL PROTECTED] wrote:
On Friday 22 February 2008 08:45:42 [EMAIL PROTECTED] wrote:
Modified:
trunk/src/pmc/parrotinterpreter.pmc
Log:
In thawfinish, delay setting constant flag on lib_name until
Parrot_load_lib has been called, to avoid corruption in iglobals
during GC.
This fixes segfault attempting to run tcl tests on some platforms.
Very nice. How in the world did you find this?
I know there's some weird bug somewhere related to doing a string_copy
from a
constant string to a non-constant string, but I've never been able to
track
it down.
-- c
I committed this because it fixed the specific problem I was having with
lib_name, and helped track down the problem; but it is not the correct
solution, as shown by bug #51122.from Bob Rogers, which shows the same
problem but on hll_name.
The true problem is that it is not safe to set the constant flag on a
string after creation, as the constant flag implies that the string's
data content is stored in a non-garbage-collectable area, which is only
true if the flag is set before the storage is allocated, so the
allocation can be from to the constant pool.
Removing the setting of the flag breaks assertions in
Parrot_register_HLL*, but these need to be fixed.
Peter Gibbs