[perl #60338] [BUG] NCI segfaults with null pcc_params_signature

2008-11-05 Thread via RT
# New Ticket Created by  Jeff Horwitz 
# Please include the string:  [perl #60338]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60338 


changes in r32203 cause mod_parrot to segfault, as the param signature is 
an uninitialized string.  specifically, the pcc_params_signature NCI 
attribute is null.  not sure if this corresponds to a specific parrot 
test...

creating the signature as a constant string appears to cause this problem, 
as removing PObj_constant_FLAG from src/pmc/nci.pmc:82 fixes the issue, 
though that's most certainly not a solution.

chromatic thinks we need more COW: My theory is that the JIT STRING 
conversion needs a Parrot_make_COW_reference.

tewk has a workaround: short-term comment tools/build/nativecall.pl:308 
to disable jitted NCI

backtrace is included, now with more stack smashing!

Program received signal SIGSEGV, Segmentation fault.
0x40798304 in Parrot_init_arg_sig (interp_unused=0x81b7bf8, ctx=0x832fd78,
 sig=0x0, ap=0x0, sti=0xb398) at src/inter_call.c:422
422 if (*sig) {
(gdb) bt
#0  0x40798304 in Parrot_init_arg_sig (interp_unused=0x81b7bf8, 
ctx=0x832fd78,
 sig=0x0, ap=0x0, sti=0xb398) at src/inter_call.c:422
#1  0x40797f6c in Parrot_init_arg_nci (interp=0x81b7bf8, st=0xb36c,
 sig=0x0) at src/inter_call.c:276
#2  0x082f6451 in ?? ()
#3  0x081b7bf8 in ?? ()
#4  0xb36c in ?? ()
#5  0x in ?? ()
#6  0x08193458 in ?? ()
#7  0x08310418 in ?? ()
#8  0x0200 in ?? ()
#9  0x40cdd2d8 in ?? ()
#10 0x082dda10 in ?? ()
#11 0x0832fd78 in ?? ()
#12 0x0001 in ?? ()
#13 0x in ?? ()
#14 0x in ?? ()
#15 0x in ?? ()
#16 0x in ?? ()
#17 0x081b7bf8 in ?? ()
#18 0x08193458 in ?? ()
#19 0x0100 in ?? ()
#20 0x407a0bc3 in key_next (interp=0x81b7bf8, key=0x82e1f4c) at 
src/key.c:480
#21 0x40938a6e in Parrot_NCI_invoke (interp=0x81b7bf8, pmc=0x82e1f4c,
 next=0x40cdd2ec) at nci.pmc:303
#22 0x40717116 in Parrot_invokecc_p (cur_opcode=0x40cdd2e4, 
interp=0x81b7bf8)
 at core.ops:475
#23 0x407cd83c in runops_slow_core (interp=0x81b7bf8, pc=0x40cdd2e4)
 at src/runops_cores.c:222
#24 0x4079edb9 in runops_int (interp=0x81b7bf8, offset=80)
 at src/interpreter.c:938
#25 0x4079f65f in runops (interp=0x81b7bf8, offs=80) at 
src/inter_run.c:101
#26 0x4079f904 in runops_args (interp=0x81b7bf8, sub=0x82dd7fc, 
obj=0x8328fd4,
 meth_unused=0x826cc5c, sig=0x40ad50e5 v, ap=0xb594 \2172\b)
 at src/inter_run.c:236
#27 0x4079fc96 in Parrot_run_meth_fromc_args (interp=0x81b7bf8, 
sub=0x82dd7fc,
 obj=0x8328fd4, meth=0x826cc5c, sig=0x40ad50e5 v) at 
src/inter_run.c:426
#28 0x409a9042 in initialize_parents (interp=0x81b7bf8, object=0x8328fd4,
 all_parents=0x8329108) at class.pmc:344
#29 0x409aaf7c in Parrot_Class_instantiate (interp=0x81b7bf8, 
pmc=0x832923c,
 init=0x82c8028) at class.pmc:1131
#30 0x40736446 in Parrot_new_p_pc (cur_opcode=0x40c981b0, 
interp=0x81b7bf8)
 at pmc.ops:130
#31 0x407cd83c in runops_slow_core (interp=0x81b7bf8, pc=0x40c981b0)
 at src/runops_cores.c:222
#32 0x4079edb9 in runops_int (interp=0x81b7bf8, offset=2101)
 at src/interpreter.c:938
#33 0x4079f65f in runops (interp=0x81b7bf8, offs=2101) at 
src/inter_run.c:101
#34 0x4079f904 in runops_args (interp=0x81b7bf8, sub=0x82e17f8, 
obj=0x82c8028,
 meth_unused=0x0, sig=0x4043b4d5 IP,
 ap=0xb7ec 
\2242\b-\btz,\b[EMAIL PROTECTED]@[EMAIL PROTECTED][EMAIL PROTECTED]()
 at src/inter_run.c:236
#35 0x4079fe56 in Parrot_runops_fromc_arglist_reti (interp=0x81b7bf8,
 sub=0x82e17f8, sig=0x4043b4d5 IP,
 args=0xb7ec 
\2242\b-\btz,\b[EMAIL PROTECTED]@[EMAIL PROTECTED][EMAIL PROTECTED]()
 at src/inter_run.c:527
#36 0x4078995c in Parrot_call_sub_ret_int (interp=0x81b7bf8, 
sub=0x82e17f8,
 signature=0x4043b4d5 IP) at src/extend.c:929
#37 0x4043834b in modparrot_call_sub_IP (interp=0x81b7bf8,
 namespace=0x82301d0 PIR, name=0x4043af49 
post_read_request_handler,
 ret=0xb878, pmc=0x83294a4) at src/parrot_util.c:167
#38 0x40435a17 in modparrot_call_meta_handler (interp=0x81b7bf8,
 hll=0x82301d0 PIR, hook=0x4043af49 post_read_request_handler,
 ret=0xb878) at src/mod_parrot.c:233
#39 0x40435e91 in modparrot_meta_post_read_request_handler (r=0x83cab60)
 at src/mod_parrot.c:382



Re: [perl #60178] Commit r32189 breaks Parrot on Mac OS X 10.5.4

2008-11-05 Thread Carl Mäsak
I pried r32189 apart to see which chunk of it breaks my compilation.
The commit consists of two additions and one change. The two additions
compile fine, but as soon as I make the change (attached), I can't
compile.


the-chunk.patch
Description: Binary data


[perl #48016] [DEPRECATED] store_global opcode

2008-11-05 Thread Will Coleda via RT
On Sat Dec 01 14:29:03 2007, coke wrote:
 =item Bstore_global 
 
 There are several variants of some of the above ops; all are 
deprecated,
 and are replaced by the ops {set,get}_[hll,root]_global. See also
 http://www.parrotcode.org/docs/ops/var.html.

DEPRECATED.pod also says that the global keyword in PIR is going away 
with the removal of the store_global/find_global opcodes.

We should probably remove .global at the same time; seems to be a 
leftover in IMCC's grammar. 

-- 
Will Coke Coleda


Re: Known Bug in Rakudo?

2008-11-05 Thread Patrick R. Michaud
On Thu, Oct 30, 2008 at 08:03:17AM -0700, Ovid wrote:
 This code:
 
   class Point {
   has $.x is rw;
   has $.y is rw;
 
   method get_string () {
   return $.x, $.y;
   }
   }
 
   my Point $point .= new( :x1.2, :y-3.7 );
   say $point.x;
   say $point;
 
 Generates this output:
 
   1.2
   get_string() not implemented in class 'Point'

Now fixed in r32373.  The get_string() not implemented ...
message actually comes from Parrot -- in Perl 6 we define
stringification using the CStr method (see S13):

  $ cat point.pl
  class Point {
  has $.x is rw;
  has $.y is rw;
  
  method Str() {
  return $.x, $.y;
  }
  }
  
  my Point $point .= new( :x1.2, :y-3.7 );
  say $point.x;
  say $point;
  
  $ ./parrot perl6.pbc point.pl
  1.2
  1.2, -3.7
  $

This problem was also addressed in RT #60350 (now resolved).

Hope this helps, and thanks!

Pm