HTTP/1.1 -1 Read error in cache disk data: SuccessContent-Type: application/rss+xml; charset="utf-8" Last-Modified: Sat, 22 Jan 2022 06:50:19 GMT Content-length: 78784 Connection: Close Proxy-Connection: Close X-Cache: HIT from web1.osuosl.org Server: ProxyTrack 0.5 (HTTrack 3.49.2) Parrot: {8} Active Tickets, Mine first http://trac.parrot.org/parrot/report/8 Trac Report - * List all active tickets by priority. * Show all tickets owned by the logged in user in a group first. en-us Parrot http://trac.parrot.org/parrot/chrome/site/parrot_logo.png http://trac.parrot.org/parrot/report/8 Trac v0.11.7 #1769: Getting get_integer() not implemented in class 'XXXXX' when using "morph" Sat, 04 Sep 2010 02:09:30 GMT Sun, 05 Sep 2010 14:54:24 GMT <p> Using the following code its enough to trigger the get_integer error: </p> <pre class="wiki">.namespace[] .sub main .local pmc obja, objb $P0 = newclass 'Object1' $P1 = newclass 'Object2' obja = new $P0 objb = new $P1 morph obja, objb .return() .end </pre> http://trac.parrot.org/parrot/ticket/1769 http://trac.parrot.org/parrot/ticket/1769 Report #218: change function of get_addr and set_addr Fri, 23 Jan 2009 22:22:40 GMT Thu, 18 Nov 2010 19:09:17 GMT <p> I would expect the following code to print out 'a' twice, once for each type. This patch solves the ticket. But I'm not sure how "kosher" is it. </p> <pre class="wiki">.sub main sortme('ResizablePMCArray') $P1 = get_class 'ResizablePMCArray' $P0 = subclass $P1, 'RPA' sortme('RPA') .end .sub sortme .param string type $P0 = new type $P0[0]='z' $P0[1]='a' .local pmc comparator comparator = get_global 'ascii' $P0.'sort'(comparator) $S0 = $P0[0] say $S0 .end .sub ascii .param string a .param string b $I0 = cmp_str a,b .return($I0) .end </pre><p> Instead, it generates: </p> <pre class="wiki">a Method 'sort' not found for invocant of class 'RPA' current instr.: 'sortme' pc 53 (foo.pir:21) called from Sub 'main' pc 25 (foo.pir:10) </pre><p> sort is a method on FixedPMCArray; it's inherited by esizablePMCArray. It is apparently then NOT inherited by my PIR level subclass. </p> http://trac.parrot.org/parrot/ticket/218 http://trac.parrot.org/parrot/ticket/218 Report #555: perldoc detection fails if build runs as root Tue, 14 Apr 2009 22:37:53 GMT Tue, 16 Jun 2009 17:23:44 GMT <p> If you build parrot as root, the detection of perldoc will always fail. The reason is that perldoc for security reasons runs as either 'nobody', 'nouser' or uid -2. Therefore, it cannot write to a file given as the argument to perldoc's -d option, when that file is created by File::Temp, since it's owned by root and has mode 0600. </p> <p> It also appears to me that the first part of the perldoc test is ... a little sketchy in how it should behave? capture_output doesn't collect STDERR output, it captures STDOUT output. </p> <p> I know, using &gt; instead of perldoc's -d option is possibly port unfriendly to non-Unix systems, so a better way of testing should probably be found. In my case, I do this for only Unix-y systems, so permit myself some leeway here. </p> <p> Patch to be attached. </p> <p> Regards, </p> <p> - Håvard </p> http://trac.parrot.org/parrot/ticket/555 http://trac.parrot.org/parrot/ticket/555 Report #1692: postgres libraries don't work from foreign HLLs Mon, 28 Jun 2010 11:21:00 GMT Mon, 28 Jun 2010 20:00:51 GMT <p> This works without error: </p> <pre class="wiki">.sub main :main load_bytecode 'Pg.pir' $P0 = new 'Pg' $P1 = $P0.'connectdb'('') .end </pre><p> But this dies: </p> <pre class="wiki">.HLL 'foo' .sub main :main load_bytecode 'Pg.pir' $P0 = new 'Pg' $P1 = $P0.'connectdb'('') .end </pre><p> Error: </p> <pre class="wiki">Null PMC access in invoke() current instr.: 'foo;Pg;Conn;status' pc 137 (/home/moritz/rakudo/parrot_install/lib/2.5.0-devel/library/Pg.pir:150) called from Sub 'foo;Pg;connectdb' pc 55 (/home/moritz/rakudo/parrot_install/lib/2.5.0-devel/library/Pg.pir:86) called from Sub 'main' pc 12 (foo.pir:5) </pre><p> Either Pg should be in the 'parrot' HLL, and needs explicit calling, or it should work anywhere it is included. </p> http://trac.parrot.org/parrot/ticket/1692 http://trac.parrot.org/parrot/ticket/1692 Report #476: Binaries should not contain rpath Thu, 19 Mar 2009 20:14:26 GMT Fri, 25 Feb 2011 15:09:31 GMT <p> Unfortunately I have to find out, that the created binaries of parrot contains rpath. According to the Fedora packaging guidelines binaries should not contain rpaths. Instead a separate <tt>ld.so.conf</tt> file should be used. </p> <p> I was able to remove the rpaths with chrpath but this is not the preferred way to do this. </p> http://trac.parrot.org/parrot/ticket/476 http://trac.parrot.org/parrot/ticket/476 Report #1765: Memory leak in allocate_interpreter Wed, 01 Sep 2010 21:00:04 GMT Sat, 27 Aug 2011 17:20:53 GMT <pre class="wiki">$ valgrind --leak-check=full ./parrot --leak-test t/op/interp_2.pir [...] ==4748== 131,364 (216 direct, 131,148 indirect) bytes in 1 blocks are definitely lost in loss record 184 of 184 ==4748== at 0x402328F: calloc (vg_replace_malloc.c:467) ==4748== by 0x40F262B: mem_sys_allocate_zeroed (alloc_memory.c:82) ==4748== by 0x4108184: allocate_interpreter (inter_create.c:123) ==4748== by 0x410813A: make_interpreter (inter_create.c:91) ==4748== by 0x416FFED: create_interp (parrotinterpreter.pmc:182) ==4748== by 0x41708C8: Parrot_ParrotInterpreter_init (parrotinterpreter.pmc:251) ==4748== by 0x413BCAB: Parrot_pmc_new (pmc.c:163) ==4748== by 0x40B8F13: Parrot_new_p_sc (core_ops.c:20494) ==4748== by 0x413E780: runops_slow_core (cores.c:646) ==4748== by 0x413D7F9: runops_int (main.c:218) ==4748== by 0x41098EE: runops (ops.c:126) ==4748== by 0x4103CCA: Parrot_pcc_invoke_from_sig_object (pcc.c:323) </pre> http://trac.parrot.org/parrot/ticket/1765 http://trac.parrot.org/parrot/ticket/1765 Report #754: cross-HLL export/import is experimental Fri, 12 Jun 2009 17:42:17 GMT Sat, 12 Jun 2010 05:25:59 GMT <p> The current method for loading libraries across HLLs, and importing symbols from them, is experimental both in design and implementation. Because it may take more than one release to get the kinks ironed out, we want to make sure that any users are acutely aware of that experimental status, and don't come to rely on something we plan to change at will. </p> http://trac.parrot.org/parrot/ticket/754 http://trac.parrot.org/parrot/ticket/754 Report #540: installed versions of dynext/*.so still link to -lparrot in build directory Mon, 06 Apr 2009 15:58:02 GMT Mon, 23 May 2011 00:32:01 GMT <p> The installed *.so files in lib/parrot/&lt;version&gt;/dynext/ are linked to the version of -lparrot in the build directory. </p> <p> Before changing them to link to the -lparrot in the installed directory, however, it is worth asking whether they should be linked with -lparrot at all. </p> <p> Once this is all settled, TT <a class="reopened ticket" href="http://trac.parrot.org/parrot/ticket/476" title="bug: Binaries should not contain rpath (reopened)">#476</a> should be revisited because it strips all rpath usage to work around this bug. </p> http://trac.parrot.org/parrot/ticket/540 http://trac.parrot.org/parrot/ticket/540 Report #1978: possible problem with g++ --optimize (t/pmc/float.t failure) Tue, 18 Jan 2011 16:04:01 GMT Thu, 28 Apr 2011 05:19:55 GMT <p> In testing t/pmc/float.t it failed a test when built with g++-4.5 with --optimize. </p> <p> Failed test: 102 - comparison ops: cmp_p_p: equality (passes g++ without --optimize and gcc - Ubuntu 10.10 i386) </p> <p> kid51 reported that the test passed for him using g++ v4.3.2 </p> <p> I did some further tests with Ubuntu 10.04 i386 and Ubuntu 10.10 i386 and it failed (g++ --optimize only) with g++ v4.4.3 and v4.5.1 </p> <p> NotFound and cotto both managed to reproduce the error using g++ v4.4.5 </p> <p> NotFound proposed a patch, which fixed the problem and cotto committed </p> <pre class="wiki">diff --git a/src/pmc/float.pmc b/src/pmc/float.pmc index e31cf55..dc8e06e 100644 --- a/src/pmc/float.pmc +++ b/src/pmc/float.pmc @@ -285,8 +285,9 @@ Returns the result of comparing the number with C&lt;*value&gt;. } MULTI INTVAL cmp_num(DEFAULT value) { - const FLOATVAL diff = - SELF.get_number() - VTABLE_get_number(INTERP, value); + volatile FLOATVAL n1 = SELF.get_number(); + volatile FLOATVAL n2 = VTABLE_get_number(INTERP, value); + const FLOATVAL diff = n1 - n2; return diff &gt; 0 ? 1 : diff &lt; 0 ? -1 : 0; } </pre><p> this fixed the failure. </p> <p> The main reason for creating the ticket (apart from cotto asking me to) is that we had a failure with g++ --optimize 32 bit (later versions) that did not occur without --optimize or with gcc. The test did not fail on 64 bit (perhaps because of different ways of handling floating point). </p> http://trac.parrot.org/parrot/ticket/1978 http://trac.parrot.org/parrot/ticket/1978 Report #1652: Line numbers in a particular IMCC stack trace are all wrong Thu, 20 May 2010 19:18:03 GMT Wed, 06 Jul 2011 02:28:55 GMT <p> To reproduce: </p> <p> please check out commit 93b60203b806a0303f8f7981469102ea90ce5b54 of Rakudo, configure rakudo with r46819 of parrot, and then run 'make' </p> <pre class="wiki">$ make ... /home/moritz/rakudo/parrot_install/bin/parrot -o src/gen/perl6.pbc src/Perl6/Compiler.pir error:imcc:syntax error, unexpected DOT, expecting $end ('.') in file 'src/builtins/EnumMap.pir' line 92 included from 'src/gen/builtins.pir' line 92 included from 'src/Perl6/Compiler.pir' line 1 error:imcc:syntax error ... somewhere in file 'src/builtins/EnumMap.pir' line 92 included from 'src/gen/builtins.pir' line 92 included from 'src/Perl6/Compiler.pir' line 1 make: *** [src/gen/perl6.pbc] Error 1 </pre><p> Files EnumMap.pir and bulitins.pir are 36 and 59 lines long, respectively, and line 1 in src/Perl6/Compiler.pir is a comment. So all these line numbers in the backtrace have no obvious connection to reality </p> http://trac.parrot.org/parrot/ticket/1652 http://trac.parrot.org/parrot/ticket/1652 Report #5: partcl's [puts hi] exposes memory leaks in r33137 Mon, 24 Nov 2008 16:09:14 GMT Wed, 20 Jan 2016 14:39:11 GMT <p> First get a copy of parrot (r33137) and partcl (r172) </p> <p> (( <a class="ext-link" href="http://code.google.com/p/partcl/wiki/PartclSource"><span class="icon"> </span>http://code.google.com/p/partcl/wiki/PartclSource</a> )) </p> <p> Once you've built partcl, run the following command: </p> <p> valgrind --suppressions=/home/coke/sandbox/parrot/tools/dev/parrot.supp --num-callers=500 --leak-check=full --leak-resolution=high --show-reachable=yes ./parrot --leak-test languages/tcl/tcl.pbc -e "puts hi" </p> <p> This generates the about-to-be-attached valgrind output. (I've suppressed some uninit. warnings in this output to highlight the memory issues.) </p> http://trac.parrot.org/parrot/ticket/5 http://trac.parrot.org/parrot/ticket/5 Report #508: JSON libraries should be renamed to something less confusing Thu, 26 Mar 2009 21:50:51 GMT Mon, 10 May 2010 13:19:50 GMT <p> There are three JSON.pbc files currently:- </p> <p> * compilers/json/JSON.pbc - for reading JSON. * library/JSON.pbc - for writing JSON. * library/Config/JSON.pbc for reading and writing config files containing JSON. </p> <p> The supplied patch renames the purely read/write ones to library/JSONReader.pbc and library/JSONWriter.pbc. </p> <p> However, what this patch misses is leaving a stub PBCs to manage a proper deprecation cycle. </p> http://trac.parrot.org/parrot/ticket/508 http://trac.parrot.org/parrot/ticket/508 Report #2108: document how to open tickets via email. Wed, 11 May 2011 20:55:19 GMT Sat, 02 Jul 2011 20:23:46 GMT <p> Which is to send an email to tickets at parrot dot org. </p> http://trac.parrot.org/parrot/ticket/2108 http://trac.parrot.org/parrot/ticket/2108 Report #2150: t/library/nciutils.t fails on windows Tue, 12 Jul 2011 13:25:02 GMT Wed, 20 Jul 2011 16:34:15 GMT <p> t/library/nciutils.t is failing on windows. This is because of a particular expected behavior that is not supported on that platform. On windows, passing a NULL handle to GetProcAddress returns a null function pointer (equivalent operations on linux, a NULL library handle will look up the function in the current process). </p> <p> I fixed a related failure in <a class="closed ticket" href="http://trac.parrot.org/parrot/ticket/2148" title="bug: t/pmc/nci.t fails on windows (closed: fixed)">#2148</a> by checking in src/platform/win32/dl.c:Parrot_dlsym for a NULL handle, and calling GetModuleHandle("libparrot"). That call looks up the libparrot binary in the current executing process, and returns a handle to it. Passing that handle to GetProcAddress allows us to find function in libparrot. That works (so long as the module is called "libparrot", which might be a little bit brittle, but that's another issue) </p> <p> t/library/nciutils.t uses a null library handle to look up functions from libc, which works on linux because a null handle looks up in the current process. My fix on windows only looks up the function in the libparrot module. I don't know if there is a way to look up a function in an entire process, but I haven't been able to find such a method yet. </p> <p> There are two options: </p> <ul><li>Change the test to explicitly load a library by name, instead of using a null library PMC and hoping the magic behavior just works in a cross-platform way </li><li>Mark the test TODO on windows, and keep searching for a way to make it work the same way as it does on Linux. </li></ul> http://trac.parrot.org/parrot/ticket/2150 http://trac.parrot.org/parrot/ticket/2150 Report #1943: Failure due to missing external definition of inlined functions Mon, 10 Jan 2011 04:41:27 GMT Wed, 19 Jan 2011 19:52:59 GMT <p> As of version RELEASE_2_11_0-902-gdce9186, attempting to build parrot with Sun's compiler under Linux fails with the following errors: </p> <pre class="wiki">/tmp/parrot/blib/lib/libparrot.so: undefined reference to `Parrot_pmc_box_integer' /tmp/parrot/blib/lib/libparrot.so: undefined reference to `Parrot_pmc_box_string' /tmp/parrot/blib/lib/libparrot.so: undefined reference to `Parrot_pmc_box_number' </pre><p> The problem is a reappearance of TT <a class="closed ticket" href="http://trac.parrot.org/parrot/ticket/1646" title="bug: Failure due to missing external definition of inlined function ... (closed: fixed)">#1646</a>. There really seem to be three separate issues: </p> <p> 1. The config::auto inline test does not test the inline keyword in the way that parrot ultimately uses it. (It specifies neither static nor external, and is in the same file as it is ultimately used.) It is relevant to note that gcc -std=c99 won't accept the current inline test files either. A correct test would test the way that inline is intended to actually be used. If parrot wants to assume that inline functions also have external linkage, then the tests should be written to test for this. Note that traditional GNU inline behavior is different from C99 behavior. A good discussion of these issues is at <a class="ext-link" href="http://www.greenend.org.uk/rjk/2003/03/inline.html"><span class="icon"> </span>http://www.greenend.org.uk/rjk/2003/03/inline.html</a>. (In perl 5, we test for and use only <tt> static inline </tt>. Feel free to copy those tests.) </p> <p> 2. The result of the configure test is, in some cases, ignored anyway. Specifically, if the compiler passes the second test for <tt> __inline </tt>, the following code in <tt> config/gen/config_h/feature_h.in </tt> unconditionally uses a plain <tt> inline </tt> anyway, even though Configure determined that didn't work: </p> <pre class="wiki">#if defined(__STDC_VERSION__) &amp;&amp; __STDC_VERSION__ &gt;= 199901L # define PARROT_INLINE inline # define PARROT_HAS_INLINE #else # define PARROT_INLINE #endif </pre><p> 3. The functions above are never declared 'extern'. </p> http://trac.parrot.org/parrot/ticket/1943 http://trac.parrot.org/parrot/ticket/1943 Report #562: subclassing basic number types fails to inherit basic ops like add, sub, mul and div Sat, 18 Apr 2009 11:05:14 GMT Sat, 05 Dec 2009 23:00:15 GMT <p> When subclassing base types like Integer, Float and Complex. The ops sub, add, mul and div are not properly inherited by the derived class. </p> <p> A basic example is provided by the following code: - </p> <pre class="wiki">.sub '' :main $P0 = subclass 'Integer', 'FooInt' print 'Integer: 10 - 1 = ' $P0 = new 'Integer' $P0 = 10 sub $P1, $P0, 1 say $P1 print 'FooInt: 10 - 1 = ' $P0 = new 'FooInt' $P0 = 10 #$P1 = new 'FooInt' # uncommenting here does not help sub $P1, $P0, 1 say $P1 .end </pre><p> outputs the following: - </p> <pre class="wiki">Integer: 10 - 1 = 9 FooInt: 10 - 1 = Multiple Dispatch: No suitable candidate found for 'subtract_int', with signature 'PIP-&gt;P' ... </pre><p> This appears to be related to RT <a class="ext-link" href="http://rt.perl.org/rt3/Public/Bug/Display.html?id=59630"><span class="icon"> </span>http://rt.perl.org/rt3/Public/Bug/Display.html?id=59630</a> which outlines the problem for a specific case of a Complex type. </p> <p> The attached script proves the bug also affects add, sub, mul, div for Integer, Float and Complex. It could be used as a test case. </p> http://trac.parrot.org/parrot/ticket/562 http://trac.parrot.org/parrot/ticket/562 Report #1520: P6metaclass cannot derive from already-`register`ed PMC type Sun, 21 Mar 2010 03:50:20 GMT Sun, 21 Mar 2010 03:50:20 GMT <p> Registering a PMC-proxy seems to be enough to prevent its use as a parent class. </p> <pre class="wiki">austin@andLinux:~/kakapo$ cat test.nqp INIT { P6metaclass.register('Hash'); } class Foo is Hash { INIT { say("Hello, Foo"); } } austin@andLinux:~/kakapo$ parrot-nqp test.nqp Could not build C3 linearization: ambiguous hierarchy current instr.: 'parrot;P6metaclass;register' pc 532 (runtime/parrot/library/P6object.pir:408) called from Sub '' pc -1 ((unknown file):-1) called from Sub 'parrot;PCT;HLLCompiler;evalpmc' pc 972 (compilers/pct/src/PCT/HLLCompiler.pir:538) ... call repeated 1 times called from Sub 'parrot;PCT;HLLCompiler;compile' pc 388 (compilers/pct/src/PCT/HLLCompiler.pir:287) called from Sub 'parrot;PCT;HLLCompiler;eval' pc 992 (compilers/pct/src/PCT/HLLCompiler.pir:556) called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1303 (compilers/pct/src/PCT/HLLCompiler.pir:707) called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1489 (compilers/pct/src/PCT/HLLCompiler.pir:794) called from Sub 'parrot;NQP;Compiler;main' pc -1 ((unknown file):-1) </pre><p> I suspect (based on scanning a trace, but not based on <i>poring over</i> the trace) that the problem lies in the <tt>get_parrotclass</tt> method. </p> <p> The <strong>major</strong> impact for me is interoperation between the Kakapo library, which registers a large collection of PMC types, and the PCT/PGE tools, which build many of their classes as subtypes of Hash. </p> http://trac.parrot.org/parrot/ticket/1520 http://trac.parrot.org/parrot/ticket/1520 Report #1496: Parrot_String-related functions are only available from parrot/parrot.h Thu, 04 Mar 2010 15:47:17 GMT Fri, 17 Sep 2010 16:43:48 GMT <p> As reported by Joshua Tolley: </p> <pre class="wiki"> I'm calling Parrot_compile_string(), which as one of its arguments takes a pointer to a Parrot_String object, where apparently it puts error messages should the string I'm compiling happen not to compile. Presumably in order to test the resulting string for NULL, convert it to a C string, etc., I should use the stuff declared in string_funcs.h. The problem is that everything in string_funcs.h is defined only if PARROT_IN_CORE is defined. PARROT_IN_CORE, in turn, is defined only if I include parrot.h </pre><p> Since only parrot internals should include parrot/parrot.h, these functions need to be made available from parrot/embed.h and parrot/extend.h </p> http://trac.parrot.org/parrot/ticket/1496 http://trac.parrot.org/parrot/ticket/1496 Report #2107: "Failed to load libpcre" during build Wed, 11 May 2011 20:42:39 GMT Fri, 12 Aug 2011 01:46:04 GMT http://trac.parrot.org/parrot/ticket/2107 http://trac.parrot.org/parrot/ticket/2107 Report #802: freeze opcode segfaults on working bytecode from Rakudo Thu, 02 Jul 2009 15:20:50 GMT Sat, 27 Aug 2011 16:50:29 GMT <p> The following compiles bytecode from PIR and perl6 source strings and verifies that a subroutine works in both cases. The PIR example can be frozen (and thawed in other tests) but the perl6 example causes freeze to segfault. Tested only on linux/amd64. Fixing this would be assist a project to build a versioned module database for Rakudo (Synopsis 11). </p> <pre class="wiki"># freeze-test.pir # Assumes parrot was installed by Rakudo's Configure --gen-parrot # - edit the load_bytecode line otherwise. .sub 'testmain' :main .local string testPIRsource testPIRsource = &lt;&lt;' testPIRsource_end' .sub test_PIR .param string x .local string result result = 'test PIR ' result .= x .return ( result ) .end testPIRsource_end .local pmc PIRcompiler, testPIRbytecode, parrotnamespace, test_PIR PIRcompiler = compreg 'PIR' # parrot/docs/pdds/draft/pdd06_pasm.pod testPIRbytecode = PIRcompiler( testPIRsource ) parrotnamespace = get_root_namespace [ 'parrot' ] test_PIR = parrotnamespace.'find_sub' ('test_PIR') $S0 = test_PIR ( '10 b' ) # execute the generated bytecode print $S0 say ' PIR code compiled, ready to be frozen' .local string testP6source testP6source = &lt;&lt;' testP6source_end' sub test_P6 ( Str $x ) { return "test P6 $x"; } testP6source_end # the next line assumes rakudo configured with --gen-parrot load_bytecode '../perl6.pbc' # adjust directory if different .local pmc P6compiler, testP6bytecode, P6namespace, test_P6 # see similar code in .sub 'eval' in rakudo/src/builtins/control.pir P6compiler = compreg 'perl6' testP6bytecode = P6compiler.'compile' ( testP6source ) P6namespace = get_root_namespace [ 'perl6' ] test_P6 = P6namespace.'find_sub' ('test_P6') $S0 = test_P6 ( '10 c' ) print $S0 say ' Perl 6 code compiles, ready to be frozen' .local string frozenPIR, filename frozenPIR = freeze testPIRbytecode filename = "/tmp/bytecode_from_PIR.frozen" .local pmc filehandle filehandle = open filename, "w" print filehandle, frozenPIR close filehandle $I0 = stat filename, 1 # 1 means get file size print $I0 say ' bytes frozen from PIR' .local string frozenP6 # Uncomment the next line to see the problem # frozenP6 = freeze testP6bytecode # segfaults filename = "/tmp/bytecode_from_P6.frozen" filehandle = open filename, "w" print filehandle, frozenP6 close filehandle $I0 = stat filename, 1 # 1 means get file size print $I0 say ' bytes frozen from Perl 6' .end # Original problem encountered in: # http://gitorious.org/parrot-module-lib/main/blobs/master/t/10-make-bytecode.t </pre> http://trac.parrot.org/parrot/ticket/802 http://trac.parrot.org/parrot/ticket/802 Report #2128: Ability to build NCI thunks with Distutils Wed, 01 Jun 2011 15:57:10 GMT Wed, 01 Jun 2011 15:57:10 GMT <p> The ability for external projects to build their own NCI thunk libraries for adding custom signatures to Parrot's NCI is a key step in the roadmap for the NCI system. I'm sure this capability exists. However, I cannot find a way to do it that makes sense to me. </p> <p> The ability to create new NCI thunks for extension projects should be easy. The process needs to be documented, and we should add the functionality to our current build infrastructure Distutils. By adding it to distutils, all projects which currently rely on that library for building will be able to make use of custom NCI thunks for their projects. </p> <p> This is becoming a priority to help with GSoC. </p> http://trac.parrot.org/parrot/ticket/2128 http://trac.parrot.org/parrot/ticket/2128 Report #1801: Properly merge pools in GC MS2 when child interpreter destroyed. Fri, 24 Sep 2010 01:10:15 GMT Fri, 24 Sep 2010 03:52:47 GMT <p> Currently GC MS2 doesn't properly clean up in finalize mode due absence of merging pools functionality. It should be implemented. </p> http://trac.parrot.org/parrot/ticket/1801 http://trac.parrot.org/parrot/ticket/1801 Report #1802: PMC Creation Functions Can Cause Segfaults Fri, 24 Sep 2010 05:42:39 GMT Thu, 02 Dec 2010 21:49:14 GMT <p> The exported Parrot_pmc_new(), Parrot_pmc_new_noinit(), Parrot_pmc_new_init(), Parrot_pmc_new_init_int(), Parrot_pmc_new_constant_noinit(), Parrot_pmc_new_constant(), Parrot_pmc_new_constant_init(), and Parrot_pmc_new_constant_init() functions all take an INTVAL base_type parameter. The functions use this parameter as an index into the given interpreter's vtable array to determine which PMC to create. </p> <p> These functions perform no appropriate checking to determine if the base_type is positive or within the appropriate range of values for the known vtable types. Any extension could crash Parrot by passing in an invalid value. </p> <p> We should consider changing the type of the base_type to UINTVAL, but we should also perform bounds checking against interp-&gt;n_vtable_alloced in all of these functions (probably with a static function). </p> http://trac.parrot.org/parrot/ticket/1802 http://trac.parrot.org/parrot/ticket/1802 Report #607: ordered destruction Tue, 28 Apr 2009 22:56:44 GMT Wed, 04 Jan 2012 10:38:38 GMT <p> Extend or modify the existing GC and GC modules to allow ordered destruction (guarantee that the children of one PMC will all be destroyed before that PMC, etc). </p> http://trac.parrot.org/parrot/ticket/607 http://trac.parrot.org/parrot/ticket/607 Report #1916: Deprecate freeze, thaw, and thawfinish VTABLEs Thu, 30 Dec 2010 16:38:09 GMT Sat, 27 Aug 2011 17:08:29 GMT <p> I would like to deprecate the freeze, thaw, and thawfinish vtables as they currently exist. freeze and thaw can both be implemented with the existing "visit" vtable. In many cases, freeze and thaw already redirect to visit. For consistency, I would like to rename thawfinish to "visitfinish". We do not need to modify thawfinish any further. </p> http://trac.parrot.org/parrot/ticket/1916 http://trac.parrot.org/parrot/ticket/1916 Report #2023: Improve triggering of GC in GMS. Sun, 20 Feb 2011 10:23:43 GMT Sun, 20 Feb 2011 14:08:03 GMT <p> Hello. </p> <p> Currently triggering of GC in GMS GC is too naive and should be improved. </p> <p> Obvious things to implement: 1. Triggering of nursery collection should be dynamically adjusted based on pause time and GC pressure. 2. Triggering of older generations can be based on amount of allocated memory in collection. </p> <p> -- Bacek. </p> http://trac.parrot.org/parrot/ticket/2023 http://trac.parrot.org/parrot/ticket/2023 Report #1906: [DEPRECATED] Passing non-const STRING* is deprecated. Sun, 26 Dec 2010 01:15:28 GMT Tue, 19 Jul 2011 05:55:06 GMT <p> Hello. </p> <p> All [*] functions currently accepting naked <tt>STRING*</tt> argument will accept <tt>const STRING*</tt>. Which includes public-facing API functions, VTABLEs, etc. </p> <p> This is for making parrot const-correct in immutable-string world. </p> <p> (Actual milestone should be 3.3) </p> <p> -- Bacek. </p> <p> [*] Parrot_str_pin and Parrot_str_unpin will stay in current form. </p> http://trac.parrot.org/parrot/ticket/1906 http://trac.parrot.org/parrot/ticket/1906 Report #132: Can't thaw a Sub (or a PIR subclass of a Sub) Tue, 06 Jan 2009 03:52:34 GMT Wed, 12 May 2010 05:48:35 GMT <p> Code: </p> <pre class="wiki">.sub main :main $P0 = get_class 'Sub' $P1 = subclass $P0, 'myProc' .local pmc pirC pirC = compreg 'PIR' .local string code code = &lt;&lt;"END_CODE" .sub bar say "hi" .end END_CODE .local pmc compiled compiled = pirC(code) compiled = compiled[0] # just want the first executable sub here. compiled() # works .local pmc sub sub = new 'myProc' assign sub, compiled sub() # works $S0 = freeze sub say "frozen" $P2 = thaw $S0 say "thawed" $P2() .end </pre><p> Output: </p> <pre class="wiki">hi hi frozen Unsupported key type in Key.thaw current instr.: 'main' pc 48 (borked.pir:30) </pre><p> I'd expect to be able to thaw this PMC, and then invoke the sub after thaw. </p> http://trac.parrot.org/parrot/ticket/132 http://trac.parrot.org/parrot/ticket/132 Report #203: assign_pmc broken for pir subclasses? Wed, 21 Jan 2009 16:05:00 GMT Tue, 21 Jul 2009 02:19:51 GMT <pre class="wiki">.sub main $P1 = new 'Hash' .local pmc undef undef = new 'Undef' assign $P1, undef $S0 = typeof $P1 say $S0 $P1 = get_class 'Hash' $P2 = subclass $P1, 'myHash' $P1 = new 'myHash' .local pmc undef undef = new 'Undef' assign $P1, undef $S0 = typeof $P1 say $S0 .end </pre><p> this prints: </p> <pre class="wiki">Undef myHash </pre><p> but I expect it to print </p> <pre class="wiki">Undef Undef </pre><p> - this is blocking partcl. </p> http://trac.parrot.org/parrot/ticket/203 http://trac.parrot.org/parrot/ticket/203 Report #205: r35872 test fails on solaris Wed, 21 Jan 2009 20:39:05 GMT Fri, 13 Aug 2010 14:10:55 GMT <p> Test Summary Report </p> <hr /> <p> t/op/trans (Wstat: 256 Tests: 22 Failed: 1) </p> <blockquote> <p> Failed test: 14 Non-zero exit status: 1 </p> </blockquote> <p> Files=395, Tests=11826, 574 wallclock secs ( 3.10 usr 1.83 sys + 89.02 cusr 30.35 csys = 124.30 CPU) Result: FAIL make: *** [test] Error 1 </p> <p> I'm not sure what else you need, so here are some random things. </p> <p> uname -a SunOS web01-dev 5.10 Generic_127112-11 i86pc i386 i86pc Solaris </p> <p> ./parrot -V This is parrot version 0.9.0-devel built for nojit. Copyright (C) 2001-2008, The Perl Foundation. </p> <p> This code is distributed under the terms of the Artistic License 2.0. For more details, see the full text of the license in the LICENSE file included in the Parrot source tree. </p> http://trac.parrot.org/parrot/ticket/205 http://trac.parrot.org/parrot/ticket/205 Report #775: Simplify makefile rules on windows. Thu, 18 Jun 2009 22:01:39 GMT Sun, 13 Jun 2010 03:58:51 GMT <p> Windows XP Professional, ActivePerl 5.10.0.1005-MSWin32, dmake 4.11 </p> <p> Trying to build Parrot using dmake results in the following error: </p> <pre class="wiki">dmake: makefile: line 126: Warning: -- Macro `O' redefined after use dmake: makefile: line 130: Warning: -- Macro `A' redefined after use dmake: makefile: line 3236: Warning: -- Found non-white space character after '[' in [[ -d parrot-$(VERSION) ] || ln -s $(CUR_DIR) parrot-$(VERSION)]. dmake: makefile: line 3340: Error: -- Incomplete rule recipe group detected </pre><p> (See attached Makefile) Especially for Strawberry Perl users this might be a blocker, as afaik Strawberry Perl ships only dmake by default, so someone should probably document this somewhere. </p> http://trac.parrot.org/parrot/ticket/775 http://trac.parrot.org/parrot/ticket/775 Report #326: win32 Wide API needed . 'make smoke' failed 63 tests. Fri, 13 Feb 2009 15:38:38 GMT Mon, 21 Feb 2011 14:21:13 GMT <p> It failed 63 tests. </p> <p> see <a class="ext-link" href="http://smolder.plusthree.com/app/public_projects/report_details/17984"><span class="icon"> </span>http://smolder.plusthree.com/app/public_projects/report_details/17984</a> </p> <p> parrot fails to load: .\parrot.exe -o C:/DOCUME~1/É¢»¨ÄÁÈË/LOCALS~1/Temp/tySepN24eO </p> <p> The Windows Wide API is not enabled. </p> <p> As workaround $TEMP could be checked to point to a pure ascii path. </p> http://trac.parrot.org/parrot/ticket/326 http://trac.parrot.org/parrot/ticket/326 Report #1825: How To Utilize The GCC Compile Farm Wed, 13 Oct 2010 00:55:18 GMT Wed, 20 Oct 2010 17:27:39 GMT <p> Parrot now has access to the GCC Compile Farm, graciously hosted by the Free Software France organization. We need to figure out how best to use it i.e. installing <a class="wiki" href="http://trac.parrot.org/parrot/wiki/BuildBot">BuildBot</a>, TapTinder, smokers and benchmarkers across different configurations of Parrot, such as ICU/GMP/optimized/etc. </p> <p> Here are some links to a presentation about the Compile Farm: </p> <p> <a class="ext-link" href="https://mail.gna.org/public/gcc-cfarm-users/2010-07/msg00025.html"><span class="icon"> </span>https://mail.gna.org/public/gcc-cfarm-users/2010-07/msg00025.html</a> </p> <p> This is the main wiki page: <a class="ext-link" href="http://gcc.gnu.org/wiki/CompileFarm"><span class="icon"> </span>http://gcc.gnu.org/wiki/CompileFarm</a> </p> http://trac.parrot.org/parrot/ticket/1825 http://trac.parrot.org/parrot/ticket/1825 Report #760: readline_interactive method no longer returns PMCNULL on eof Sat, 13 Jun 2009 13:28:00 GMT Thu, 03 Mar 2011 17:46:00 GMT <p> Sending EOF to the standard input (typically: hitting Control-G) does not make HLLCompiler end interactive sessions when readline is used. </p> <p> To reproduce: take your favorite HLL written with HLLCompiler, and a Parrot with readline, and run it without any argument. This should start an interactive session (i.e., you get a prompt for the language), but hitting <tt>^G</tt> makes HLLCompiler display a new prompt instead of exiting. </p> <p> This bug has two origins: </p> <p> * the "readline_interactive" method of FileHandle always returns a string (that's because of its type: when it seems to return NULL, it is actually converted to the empty string). On the other hand, HLLCompiler tests if the value returned by "readline_interactive" is null to detect EOF: this test is always false... The fix is to test EOF using the "get_bool" vtable of FileHandle; and </p> <p> * the method "readline_interactive" never sets the EOF flag when readline is activated. </p> <p> The attached patch fixes this. </p> http://trac.parrot.org/parrot/ticket/760 http://trac.parrot.org/parrot/ticket/760 Report #2087: Register allocator and lexicals bug Wed, 06 Apr 2011 21:50:48 GMT Thu, 28 Apr 2011 05:16:34 GMT <p> Code: </p> <pre class="wiki">.sub '' $P42 = new ['Integer'] .lex 'i', $P42 $P69 = new ['Integer'] .lex 'j', $P69 .lex 'foo', $P10 .lex 'bar', $P11 .lex 'baz', $P12 $P3 = new ['String'] .lex 'k', $P3 $P100 = new ['String'] $P100 = "oh no" store_lex 'foo', $P100 $P101 = find_lex 'bar' say $P101 .end </pre><p> Should be a null PMC access, but prints "oh no". It looks like </p> <pre class="wiki">.lex 'foo', $P0 </pre><p> isn't considered an instruction, but just saying "this lexical goes in this register". If that's the only mention of $P0, then there's no "first instruction". It builds a du-chain, then based on that throws away $P0 from the "needs allocation" list because it confuses it with an unused register (e.g. it thinks it got optimized out, which is not the case at all here). </p> <p> This patch makes the issue go away: </p> <pre class="wiki">diff --git a/compilers/imcc/reg_alloc.c b/compilers/imcc/reg_alloc.c index de0f3e0..300216d 100644 --- a/compilers/imcc/reg_alloc.c +++ b/compilers/imcc/reg_alloc.c @@ -391,6 +391,9 @@ reg_sort_f(ARGIN(const void *a), ARGIN(const void *b)) const SymReg * const ra = *(const SymReg * const *)a; const SymReg * const rb = *(const SymReg * const *)b; + if (!ra-&gt;first_ins || !rb-&gt;first_ins) + return 0; + if (ra-&gt;first_ins-&gt;index &lt; rb-&gt;first_ins-&gt;index) return -1; @@ -473,7 +476,7 @@ build_reglist(PARROT_INTERP, ARGMOD(IMC_Unit *unit)) /* we might have unused symbols here, from optimizations */ for (i = count = unused = 0; i &lt; n_symbols; i++) { - if (!unit-&gt;reglist[i]-&gt;first_ins) + if (!unit-&gt;reglist[i]-&gt;first_ins &amp;&amp; !(unit-&gt;reglist[i]-&gt;usage &amp; U_LEXICAL)) unused++; else if (i == count) count++; @@ -716,7 +719,7 @@ vanilla_reg_alloc(PARROT_INTERP, ARGMOD(IMC_Unit *unit)) SymReg *r; for (r = hsh-&gt;data[i]; r; r = r-&gt;next) { /* TODO Ignore non-volatiles */ - if (REG_NEEDS_ALLOC(r) &amp;&amp; r-&gt;use_count) + if (REG_NEEDS_ALLOC(r)) r-&gt;color = -1; } } @@ -732,7 +735,7 @@ vanilla_reg_alloc(PARROT_INTERP, ARGMOD(IMC_Unit *unit)) for (r = hsh-&gt;data[i]; r; r = r-&gt;next) { if (r-&gt;set != reg_set) continue; - if (REG_NEEDS_ALLOC(r) &amp;&amp; (r-&gt;color == -1) &amp;&amp; r-&gt;use_count) { + if (REG_NEEDS_ALLOC(r) &amp;&amp; (r-&gt;color == -1)) { if (set_contains(avail, first_reg)) first_reg = first_avail(interp, unit, reg_set, NULL); </pre><p> But it's kinda hacky. OTOH, so is the register allocator as a whole, and this is blocking me on NQP, so provided we can be sure we don't make the quicksort of symbols to allocate unstable I'd be OK with something like this going in. Will leave it until tomorrow to see if anyone has any better ideas. </p> http://trac.parrot.org/parrot/ticket/2087 http://trac.parrot.org/parrot/ticket/2087 Report #411: RFC: Remove or fix SDL Fri, 06 Mar 2009 20:10:29 GMT Tue, 27 Jul 2010 21:08:43 GMT <p> t/examples/catchall.t shows a lot of failures even trying to /compile/ the SDL examples/libraries, let alone run them. </p> <p> I propose we remove the library and examples before the next supported release - it can go back into a release once it builds again. </p> <p> Or someone could fix it. </p> http://trac.parrot.org/parrot/ticket/411 http://trac.parrot.org/parrot/ticket/411 Report #378: Deprecation warnings in in config/gen/platform/darwin/dl.c in r37011 Thu, 26 Feb 2009 01:37:59 GMT Fri, 18 Dec 2009 01:49:21 GMT <pre class="wiki">config/gen/platform/darwin/dl.c: In function ‘Parrot_dlopen’: config/gen/platform/darwin/dl.c:129: warning: ‘NSCreateObjectFileImageFromFile’ is deprecated (declared at /usr/include/mach-o/dyld.h:145) config/gen/platform/darwin/dl.c:133: warning: ‘NSLinkModule’ is deprecated (declared at /usr/include/mach-o/dyld.h:161) config/gen/platform/darwin/dl.c:137: warning: ‘NSDestroyObjectFileImage’ is deprecated (declared at /usr/include/mach-o/dyld.h:147) config/gen/platform/darwin/dl.c:144: warning: ‘NSAddImage’ is deprecated (declared at /usr/include/mach-o/dyld.h:230) config/gen/platform/darwin/dl.c: In function ‘Parrot_dlsym’: config/gen/platform/darwin/dl.c:218: warning: ‘NSIsSymbolNameDefined’ is deprecated (declared at /usr/include/mach-o/dyld.h:176) config/gen/platform/darwin/dl.c:220: warning: ‘NSLookupAndBindSymbol’ is deprecated (declared at /usr/include/mach-o/dyld.h:179) config/gen/platform/darwin/dl.c:226: warning: ‘NSIsSymbolNameDefinedInImage’ is deprecated (declared at /usr/include/mach-o/dyld.h:178) config/gen/platform/darwin/dl.c:228: warning: ‘NSLookupSymbolInImage’ is deprecated (declared at /usr/include/mach-o/dyld.h:182) config/gen/platform/darwin/dl.c:235: warning: ‘NSLookupSymbolInModule’ is deprecated (declared at /usr/include/mach-o/dyld.h:181) config/gen/platform/darwin/dl.c:246: warning: ‘NSAddressOfSymbol’ is deprecated (declared at /usr/include/mach-o/dyld.h:188) config/gen/platform/darwin/dl.c: In function ‘Parrot_dlclose’: config/gen/platform/darwin/dl.c:272: warning: ‘NSUnLinkModule’ is deprecated (declared at /usr/include/mach-o/dyld.h:169) </pre> http://trac.parrot.org/parrot/ticket/378 http://trac.parrot.org/parrot/ticket/378 Report #1500: API to tell which opcode group an opcode is in Sat, 06 Mar 2010 03:57:05 GMT Mon, 24 Oct 2011 14:58:11 GMT <p> I am currently hacking on PL/Parrot and one of the very important features that we need is disallowing certain operations, most notably file I/O. The motivation for this is that you do not want a stored procedure written in PIR to be able to modify the database via disk operations. </p> <p> I talked with chromatic in #parrot about needing some security subsystem features and he agreed that we need an API for telling if an opcode is in a particular opcode group. This is talked about in PDD18 if you want to get the full background. </p> <p> For instance, take the open opcode: </p> <pre class="wiki">inline op open(out PMC, in STR, in STR) :filesys_open { /* etc... */ } </pre><p> It is defined to be in the "filesys_open" opcode group. Currently there is no way to tell if a certain opcode is in a given group. The information does not seem to make it into op_info_t, but it is in lib/Parrot/OpLib/core.pm . I propose a public C API that will consist of at least these three functions: </p> <p> <tt> Parrot_sec_opcode_is_in_group(string opcode_name, string group_name) </tt> </p> <p> This function would take an opcode name and opcode group name as argument and return true if the opcode is in the group, false otherwise. </p> <p> <tt> Parrot_sec_opcodes_in_group(string opcode_group) </tt> </p> <p> This function takes a string argument of an opcode group name and returns a ResizableStringArray containing all opcodes in that group. </p> <p> <tt> Parrot_sec_groups_containing_opcode(string opcode_name) </tt> </p> <p> This function takes a string argument of an opcode name and returns a ResizableStringArray listing all groups that contain the given opcode name. </p> <p> Once an API in C is available to accomplish these things, then it should be straight forward to access this information from PIR. </p> http://trac.parrot.org/parrot/ticket/1500 http://trac.parrot.org/parrot/ticket/1500 Report #457: t/dynpmc/os.t has invalid stat() and lstat() tests. Mon, 16 Mar 2009 13:38:44 GMT Thu, 23 Sep 2010 22:50:48 GMT <p> TT <a class="closed ticket" href="http://trac.parrot.org/parrot/ticket/325" title="bug: case-sensitivity test issues on win32 (closed: fixed)">#325</a> incorrectly put a "TODO" on the stat() and lstat() tests for Solaris in t/pmc/os.t. stat() and lstat() work fine on Solaris. The problem is that the test is wrong. It erroneously assumes that the st_dev value reported by one program (parrot, in this case) is necessarily the same as the st_dev value reported by another program (perl, in this case) that might have been compiled in a different mode. Specifically, on Solaris, the default system perl is compiled in 32-bit mode. If parrot is compiled in 64-bit mode, it will get a different 'st_dev' value. That's not a problem because, according to the Solaris man page for stat(2): </p> <p> <tt> Its value may be used as input to the ustat() function to determine more information about this file system. No other meaning is associated with this value. </tt> </p> <p> The fix is "simple": t/dynpmc/os.t should only compare the last 12 entries returned by stat, not all 13. Alas, I don't know how to do that in PIR. </p> <p> This problem is not necessarily specific to Solaris, though that's the platform where a mix of models is most likely to be encountered. </p> <p> If no one has the time to fix the tests, they should probably be skipped. Currently, it can result in spurious passing TODOs if perl and parrot happen to have been compiled in the same mode. </p> <p> <strong>UPDATE</strong>: Updated description 2010-09-20 to reflect movement of file from <i>t/pmc/</i> to <i>t/dynpmc</i>. </p> http://trac.parrot.org/parrot/ticket/457 http://trac.parrot.org/parrot/ticket/457 Report #370: Rounding Inf and NaN Tue, 24 Feb 2009 08:52:42 GMT Thu, 09 Sep 2010 20:31:59 GMT <p> $ ./perl6 </p> <blockquote class="citation"> <p> say ceiling(NaN) </p> </blockquote> <p> -2147483648 </p> <blockquote class="citation"> <p> say floor(NaN) </p> </blockquote> <p> -2147483648 </p> <blockquote class="citation"> <p> say floor(Inf) </p> </blockquote> <p> -2147483648 </p> <blockquote class="citation"> <p> say ceiling(Inf) </p> </blockquote> <p> -2147483648 </p> http://trac.parrot.org/parrot/ticket/370 http://trac.parrot.org/parrot/ticket/370 Report #777: .HLL should not case-mangle its arg Fri, 19 Jun 2009 17:16:44 GMT Tue, 11 Jan 2011 10:21:22 GMT <p> In many cases, .HLL 'Donut' is the same as .HLL 'donut'; however, in some cases (e.g. ParrotInterpreter.hll_map()), it's not. </p> <p> I recommend that to avoid any potential for confusion, we remove any case mangling and treat the HLL exactly specified in the directive. </p> <p> If we get consensus on this, we can add a deprecation notice for 1.4 and change it immediately after release. </p> http://trac.parrot.org/parrot/ticket/777 http://trac.parrot.org/parrot/ticket/777 Report #545: PackFile_unpack followed by PackFile_pack produces wrong results. Wed, 08 Apr 2009 12:19:51 GMT Sat, 19 Feb 2011 20:27:03 GMT <p> PackFile_pack for previously unpacked PBC reuses old PackFile_Header which leads to creating incorrect PBC. </p> http://trac.parrot.org/parrot/ticket/545 http://trac.parrot.org/parrot/ticket/545 Report #1589: Move . to the end of the library search path Sat, 24 Apr 2010 05:39:42 GMT Sat, 11 Jun 2011 01:10:19 GMT <p> Here's a snippet of strace output after I accidentally ran parrot-nqp in a directory with a Regex.pbc file: </p> <pre class="wiki">stat64("./Regex.pbc", {st_mode=S_IFREG|0644, st_size=100432, ...}) = 0 open("./Regex.pbc", O_RDONLY|O_LARGEFILE) = 3 stat64("./P6object.pbc", 0xbf9ee9bc) = -1 ENOENT (No such file or directory) stat64("./P6object.pir", 0xbf9ee9bc) = -1 ENOENT (No such file or directory) stat64("./P6object.pasm", 0xbf9ee9bc) = -1 ENOENT (No such file or directory) stat64("./P6object.pbc", 0xbf9ee9bc) = -1 ENOENT (No such file or directory) stat64("/usr/local/./P6object.pbc", 0xbf9ee9bc) = -1 ENOENT (No such file or directory) stat64("/usr/local/./P6object.pir", 0xbf9ee9bc) = -1 ENOENT (No such file or directory) stat64("/usr/local/./P6object.pasm", 0xbf9ee9bc) = -1 ENOENT (No such file or directory) stat64("/usr/local/./P6object.pbc", 0xbf9ee9bc) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/parrot/2.3.0-devel/library/P6object.pbc", {st_mode=S_IFREG|0644, st_size=18448, ...}) = 0 stat64("/usr/local/lib/parrot/2.3.0-devel/library/P6object.pbc", {st_mode=S_IFREG|0644, st_size=18448, ...}) = 0 stat64("/usr/local/lib/parrot/2.3.0-devel/library/P6object.pbc", {st_mode=S_IFREG|0644, st_size=18448, ...}) = 0 stat64("/usr/local/lib/parrot/2.3.0-devel/library/P6object.pbc", {st_mode=S_IFREG|0644, st_size=18448, ...}) = 0 open("/usr/local/lib/parrot/2.3.0-devel/library/P6object.pbc", O_RDONLY|O_LARGEFILE) = 3 </pre><p> Parrot has taken Regex.pbc in the current directory before even checking for it in the standard libraries. The same behavior occurs with all other Parrot-based programs which use installed libraries. This provides an attack vector against Parrot users: </p> <ol><li>Wait for Perl6-on-Parrot to hit the big time. </li><li>Distribute a shady tarball containing a malicious P6Regex.pbc inside it. </li><li>The victim unpacks the tarball and attempts to analyze the contents. </li><li>The user runs his Perl 6 based editor. </li><li>Rakudo loads Perl6.pbc from the current directory. My code is now running. </li></ol><p> It's probably best to follow Perl 5's example here: </p> <pre class="wiki">$ perl -V ... @INC: /usr/local/lib/perl5/site_perl/5.12.0/i686-linux-thread-multi /usr/local/lib/perl5/site_perl/5.12.0 /usr/local/lib/perl5/5.12.0/i686-linux-thread-multi /usr/local/lib/perl5/5.12.0 . </pre><p> With the current directory at the end, installed programs which use only installed libraries will never be tricked into running code in the current directory. Hopefully it is not too common for installed programs to reference nonexistant libraries. </p> http://trac.parrot.org/parrot/ticket/1589 http://trac.parrot.org/parrot/ticket/1589 Report #558: [doc] < is not always escaped in HTML generation Thu, 16 Apr 2009 10:07:21 GMT Sun, 30 Jan 2011 04:13:05 GMT <p> in PIR block (=begin/end), the character &lt; is not escaped to a valid HTML entity. </p> <p> for example in book/ch03_pir.pod : </p> <pre class="wiki">&lt;pre&gt; .sub _main $I0 = 42 $I1 = 43 if $I0 &lt; $I1 goto L1 print "never printed" L1: print "after branch\n" end .end &lt;/pre&gt; </pre> http://trac.parrot.org/parrot/ticket/558 http://trac.parrot.org/parrot/ticket/558 Report #559: [doc] POD escape E<> is not handled by HTML generation Thu, 16 Apr 2009 10:12:00 GMT Sun, 30 Jan 2011 04:22:00 GMT <p> for example in book/ch09_pasm.pod, </p> <p> POD E&lt;#x3C0&gt; is not transformed to HTML entity &amp;#x3C0; </p> <pre class="wiki">&lt;pre&gt; set I0, 42 # set integer register #0 to the integer value 42 set N3, 3.14159 # set number register #3 to an approximation of E&lt;#x3C0&gt; </pre> http://trac.parrot.org/parrot/ticket/559 http://trac.parrot.org/parrot/ticket/559 Report #579: build failure on Solaris/x86 with GCC and native assembler Fri, 24 Apr 2009 12:09:21 GMT Mon, 17 Jan 2011 15:44:07 GMT http://trac.parrot.org/parrot/ticket/579 http://trac.parrot.org/parrot/ticket/579 Report #697: Parrot::Test "language_output_is" fails in installed parrot. Thu, 21 May 2009 15:52:18 GMT Sat, 02 Jul 2011 22:24:16 GMT <p> In <a class="ext-link" href="http://code.google.com/p/partcl/"><span class="icon"> </span>partcl</a>, any of the perl based tests are failing: </p> <pre class="wiki">$ prove t/cmd_cd.t [17:47:47] t/cmd_cd.t .. 1/3 # Failed test 'cd too many args' # at t/cmd_cd.t line 17. # got: '' # expected: 'wrong # args: should be "cd ?dirName?" # ' # '/usr/local/lib/parrot/1.2.0/tools/parrot ........../tcl.pbc t/cmd_cd_1.tcl' failed with exit code -1 </pre><p> Looks like the path to parrot is wrong (This is on feather), and the path to tcl.pbc is wrong, assuming those ...'s are literal. </p> http://trac.parrot.org/parrot/ticket/697 http://trac.parrot.org/parrot/ticket/697 Report #706: Out of mem (PASM, compreg, invokecc) Tue, 26 May 2009 12:32:49 GMT Wed, 08 Sep 2010 21:39:41 GMT <p> Attached test use compreg P1, "PASM" and invokecc it 100,000 times. On i386-MSWin32 (mingw32) it consumes 66MB of RAM with r39159 (107 MB of RAM with r11704). </p> <p> If you replace "lt I20, 100000, NEXT" to "lt I20, 10000000, NEXT" it fails with "Parrot VM: PANIC: Out of mem! C file src\gc\alloc_memory.c, line 142". </p> <pre class="wiki">set S28, "" concat S28, ".pcc_sub :anon _indi:\n" concat S28, " get_params \"(0,0,0)\", I0, I1, I2\n" concat S28, " set I3, 23\n" concat S28, " set_returns \"(0)\", I3\n" concat S28, " returncc\n" compreg P1, "PASM" set I20, 0 NEXT: set_args "(0)",S28 get_results "(0)", P0 invokecc P1 needs_destroy P0 sweep 0 inc I20 lt I20, 100000, NEXT # sleep 10 end </pre> http://trac.parrot.org/parrot/ticket/706 http://trac.parrot.org/parrot/ticket/706 Report #304: Some files copyright Melvin Smith Tue, 10 Feb 2009 03:04:38 GMT Tue, 27 Jul 2010 21:19:46 GMT <p> To resolve an outstanding copyright issue, the following files need to be updated to reflect a TPF or Parrot Foundation copyright. </p> <p> The easiest way to do this is to get a CLA (<a class="ext-link" href="http://www.parrot.org/files/parrot_cla.pdf"><span class="icon"> </span>http://www.parrot.org/files/parrot_cla.pdf</a>) from Melvin Smith and update the copyright to the Parrot Foundation. </p> <pre class="wiki">imcc/imcc.l imcc/imcc.y imcc/imclexer.c imcc/imcparser.c imcc/main.c imcc/parser_util.c </pre> http://trac.parrot.org/parrot/ticket/304 http://trac.parrot.org/parrot/ticket/304 Report #285: cmp/bitwise/other mmd vtable functions should not go through proxy pmc Fri, 06 Feb 2009 23:25:20 GMT Sun, 03 Jul 2011 17:12:11 GMT <p> In rakudo 1 &lt;=&gt; undef was doing the right thing while undef &lt;=&gt; 1 was failing. The first case works because integer.pmc has a multi cmp_num for undef and the VTABLE_get_integer(INTERP, value) call on the Failure value was correctly calling the Failure get_integer vtable method. When I tried to patch undef.pmcI noticed that I was having trouble getting a cmp_num vtable function in that file to call the Failure get_integer vtable method because the value for SELF was an undef pmc rather than a failure pmc. After further digging I concluded that the cmp_num function was being called through a proxy pmc and cmp_num was behaving differently in that regard from add and subtract which did an mmd call through the default pmc. The module lib/Parrot/Pmc2c/PMC/Object.pm generates the vtable forwarding functions and relies on the vtable_method_does_multi subroutine in lib/Parrot/Pmc2c/PMC.pm to decide which vtable methods go through a proxy and which don't. </p> <p> After dropping by #parrot on Feb 5 I was advised that having bitwise and cmp functions go through a proxy pmc might be an oversight and I was asked to come up with an appropriate test if possible. </p> <p> The patch included (not attached) below relies on the largely baseless assumption that none of the default pmc vtable mmd functions should go through a proxy from an object when I only seem to have been told that fewer of them should. I thought at least parts of it might be useful if taken fwiw. </p> <p> The attached patch to t/oo/vtableoverride.t should provide some testing for the desired behavior. </p> <p> Cheers, Ron </p> <p> The fwiw parrot patch: Index: lib/Parrot/Pmc2c/PMC.pm =================================================================== --- lib/Parrot/Pmc2c/PMC.pm (revision 36383) +++ lib/Parrot/Pmc2c/PMC.pm (working copy) @@ -328,14 +328,27 @@ </p> <blockquote> <p> return $self-&gt;vtable-&gt;attrs($methodname)-&gt;{write}; </p> </blockquote> <blockquote> <p> } </p> </blockquote> <p> +my $multi_cmp = qr/cmp(?:_num|_string|_pmc)?/; +my $multi_logical = qr/logical_(?:or|and|xor)/; +my $multi_bitwise = qr/bitwise_(?:or|and|xor|shl|shr|lsr)/; +my $multi_bitwise_str = qr/bitwise_(?:or|and|xor)/; +my $multi_arithmetic = qr/add|subtract|multiply|divide|floor_divide|modulus|pow/; + +my $multi_bitwise_style = qr/(?:$multi_bitwise|repeat)(?:_int)?/o; +my $multi_bitwise_str_style = qr/(?:$multi_bitwise|concat)(?:_str)?/o; +my $multi_arithmetic_style = qr/$multi_arithmetic(?:_int|_float)?/o; + +my $multi_bit_or_arith_style = qr/ + (?:i_)? + (?:$multi_bitwise_style|$multi_bitwise_str_style|$multi_arithmetic_style) +/xo; + </p> <blockquote> <p> sub vtable_method_does_multi { </p> <blockquote> <p> my ( $self, $methodname ) = @_; </p> </blockquote> </blockquote> <p> </p> <blockquote> <blockquote> <p> return 1 if ($methodname =~ m/<sup> </sup></p> </blockquote> </blockquote> <p> - (?:i_)? - (?:add|subtract|multiply|divide|floor_divide|modulus) - (?:_int|_float)? - $/x); + (?:$multi_cmp|$multi_logical|$multi_bit_or_arith_style) + $/xo); </p> <blockquote> <p> } </p> </blockquote> <p> </p> <blockquote> <p> sub super_method { </p> </blockquote> http://trac.parrot.org/parrot/ticket/285 http://trac.parrot.org/parrot/ticket/285 Report -03