Camelia, the Perl 6 bug

IRC log for #parrot, 2008-03-11

Parrot | source cross referenced

| Channels | #parrot index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:53 Coke purl, msg chromatic If I'm not here at parrot-sketch-thirty, feel free to run the meeting.
00:53 purl Message for chromatic stored.
00:56 kid51 Coke:  Can you discuss YAPC at parrotsketch (assuming you're there):  http://www.nntp.perl.org/group/perl.p​erl6.internals/2008/03/msg43704.html
00:56 shorten kid51's url is at http://xrl.us/bhhgh
00:58 Coke Sure. I'll write up a report, even if I'm not there.
01:02 kid51 Thanks.
01:24 svnbotl r26302 | chromatic++ | trunk:
01:24 svnbotl : [src] Sped up parrot_mark_hash() by around 13%.  This is a minor gain, but a
01:24 svnbotl : few minor gains in GC pay off over time.
01:24 svnbotl diff: http://parrotvm.org/svn/parrot/revision/?rev=26302
01:30 svnbotl r26303 | chromatic++ | trunk:
01:30 svnbotl : [GC] Sped up Parrot_dod_sweep() by about 13% by some minor code reorganization.
01:30 svnbotl : I also removed the assertion, as it doesn't make any sense there and was
01:30 svnbotl : leftover debugging code I accidentally checked in a while back.
01:30 svnbotl diff: http://parrotvm.org/svn/parrot/revision/?rev=26303
01:31 Ademan joined #parrot
01:49 svnbotl r26304 | chromatic++ | trunk:
01:49 svnbotl : [GC] Sped up compact_pool() by about 5%.
01:49 svnbotl diff: http://parrotvm.org/svn/parrot/revision/?rev=26304
02:03 svnbotl r26305 | chromatic++ | trunk:
02:03 svnbotl : [src] Sped up get_new_pmc_header() by about 6%.  This meant moving an exception
02:03 svnbotl : check from get_new_pmc_header() to new_pmc_header().  The latter never returns
02:03 svnbotl : NULL anyway, so there's no reason to check its return value for NULL in the
02:03 svnbotl : former.
02:03 svnbotl diff: http://parrotvm.org/svn/parrot/revision/?rev=26305
02:13 Psyche^ joined #parrot
02:18 kid51 joined #parrot
02:22 svnbotl r26306 | chromatic++ | trunk:
02:22 svnbotl : [oops] Reverted changes accidentally included in r26305.  In particular, the
02:22 svnbotl : test changes don't make any sense until the PDD 17 branch lands.
02:22 svnbotl diff: http://parrotvm.org/svn/parrot/revision/?rev=26306
02:31 jhorwitz joined #parrot
02:50 * davidfetter waves to jhorwitz
02:51 * jhorwitz migrates a database with one hand and waves with the other
02:51 * jhorwitz needs a third hand
02:52 davidfetter heh
02:52 davidfetter migrating it from what to where?
02:52 jhorwitz moving a mysql db from one server to another
02:52 davidfetter k
02:52 jhorwitz in other words, i'm copying files.  :-P
02:53 davidfetter yeah, that's their paradigm
02:53 davidfetter there are others ;)
02:53 jhorwitz i miss those...
02:56 jhorwitz davidfetter: how goes things?
03:05 davidfetter oops
04:28 Theory joined #parrot
04:47 svnbotl r26307 | allison++ | pdd17pmc:
04:47 svnbotl : [pdd17pmc] Bringing the pdd17pmc branch up-to-date with trunk r26306.
04:47 svnbotl diff: http://parrotvm.org/svn/parrot/revision/?rev=26307
05:00 x___ joined #parrot
06:26 teknomunk joined #parrot
07:18 katie_d joined #parrot
07:22 uniejo joined #parrot
08:07 iblechbot joined #parrot
08:29 AndyA joined #parrot
08:51 svnbotl r26308 | fperrad++ | pdd17pmc:
08:51 svnbotl : [Lua]
08:51 svnbotl : - fix tonumber() & tobase() in PMC LuaString
08:51 svnbotl diff: http://parrotvm.org/svn/parrot/revision/?rev=26308
09:17 * Tene looks for documentation on parrot io layers in an attempt to understand open() in parrotio.pmc
09:21 kj joined #parrot
09:38 ruoso joined #parrot
10:23 svnbotl joined #parrot
10:31 lathos allison++ # PMC merge
11:14 rdice joined #parrot
11:38 kj joined #parrot
11:55 cognominal jonathan?
11:55 purl i heard jonathan was at jnthn@jnthn.net or Jonathan Worthington or the dotnet guy or c, according to coke
12:09 Coke joined #parrot
12:12 iblechbot joined #parrot
12:28 * Coke notices that he doesn't have an email for r26308. That's going to take a whle to percolate through...
12:33 svnbotl r26311 | fperrad++ | trunk:
12:33 svnbotl : [Lua]
12:33 svnbotl : - fix merge
12:33 svnbotl diff: http://parrotvm.org/svn/parrot/revision/?rev=26311
12:41 kj joined #parrot
12:52 Coke allison: ping
12:57 Coke pmichaud: ping
13:01 gryphon joined #parrot
13:21 rhr joined #parrot
13:28 katie_d joined #parrot
13:34 skids joined #parrot
13:47 svnbotl r26312 | coke++ | trunk:
13:47 svnbotl : [tcl]
13:47 svnbotl : The target we were aiming for has been released; simplify the docs.
13:47 svnbotl : Eliminate the trial {expand} syntax: now only spelled {*}.
13:47 svnbotl : {*} was broken some time back and still needs fixing.
13:53 Coke someone verify my time math, #PS (1830 UTC) is at 1430 EDT?
14:06 lathos Yes.
14:07 lathos simon@forty-five ~ % TZ=US/Eastern date
14:07 lathos Tue Mar 11 10:06:53 EDT 2008
14:07 lathos simon@forty-five ~ % TZ=UTC date
14:07 lathos Tue Mar 11 14:06:55 UTC 2008
14:07 kj Coke: i'll be gone at #ps time; shall I pm you my report?
14:08 Coke kj: Go ahead and just post it into the channel.
14:08 kj oki
14:30 Coke lathos: danke. I did not think of that obvious solution.
14:30 * Coke wanders away to find more koohii
14:34 jhorwitz joined #parrot
14:39 * particle hands jhorwitz an old arm he's not using anymore
14:40 * jhorwitz grabs his welding tools
14:45 po_boy joined #parrot
14:50 svnbotl r26313 | coke++ | trunk:
14:50 svnbotl : [tcl]
14:50 svnbotl : Note to self: when removing a syntax, remove all *uses* of the syntax
14:50 svnbotl : as well.
14:50 svnbotl diff: http://parrotvm.org/svn/parrot/revision/?rev=26313
14:50 lathos I have an ARM, but still no cross-compiling Parrot.
14:53 PerlJam lathos: what about miniparrot?
14:54 Coke miniparrot isn't very
14:54 particle the problem is the config system
15:01 PerlJam assuming the idea behind miniparrot is to get parrot with "just" a C compiler, then miniparrot becomes a good bootstrap path
15:01 peeps[work] joined #parrot
15:06 Coke Anyone bored? Tcl is having a PAST issue that could use some tender care. =-)
15:09 svnbotl r26314 | coke++ | trunk:
15:09 svnbotl : [tcl]
15:09 svnbotl : Shave about 0.2s off each invocation of source lib/test_more.tcl when running
15:09 svnbotl : against a partcl test. (as opposed to one of the 8.5 tests)
15:09 svnbotl : (Defer loading of 'what to skip' unless we actually care.)
15:09 svnbotl diff: http://parrotvm.org/svn/parrot/revision/?rev=26314
15:09 davidfetter joined #parrot
15:34 svnbotl r26315 | jkeenan++ | trunk:
15:34 svnbotl : Applying most recent (Mar 10 2008) patch submitted by Matt Kraai in http://rt.perl.org/rt3/Tic​ket/Display.html?id=51300.
15:34 svnbotl diff: http://parrotvm.org/svn/parrot/revision/?rev=26315
15:53 svnbotl r26316 | coke++ | trunk:
15:53 svnbotl : [tcl]
15:53 svnbotl : "Resolve" RT #45659.
15:53 svnbotl : Avoid auto-morph using evil hack, which:
15:53 svnbotl : * allows us to reclaim some TODO'd tests...
16:04 cotto_work joined #parrot
16:10 iblechbot joined #parrot
16:27 teknomunk_ joined #parrot
16:39 cosimo joined #parrot
16:41 marmic joined #parrot
16:50 mj41 joined #parrot
16:53 Coke svnbotl, why do you hate america?
16:53 Coke (trimming log msgs)
17:07 Theory joined #parrot
17:11 * spinclad makes witty distinction between america and Perl 6
17:14 spinclad svnbotl gets throttled after 5 or 6 lines -- sleeping between lines not working yet, it seems
17:14 * davidfetter picks an irreverent track from the "team america: world police" soundtrack
17:14 cognominal can obama win against mac cain. Is he able to change anything?
17:17 spinclad re able to change: yes, same as anyone else
17:18 cognominal with a venal congress?
17:19 cognominal may be he could take lessig as an adviser
17:20 * spinclad declines this debate
17:21 cognominal :)
17:21 Tene parrotio.pmc doesn't have a set_pmc() function.
17:22 Tene I'm trying to implement some IO stuff for rakudo, and trying to go about it in the same way I see the other builtins in src/classes/*.pir working
17:22 Tene That is, subclass an existing pmc
17:24 Coke what would set_pmc do there?
17:24 Coke Or is this just some boilerplate that needs set_pmc ?
17:25 * Coke looks at the one of those pir files.
17:26 pmichaud alas, I will probably miss #parrotsketch again this week
17:26 Coke pmichaud: no problemo. If you have a report, feel free to paste it in.
17:26 Tene purl: pastebin
17:26 Tene purl: nopaste
17:26 purl nopaste is at http://nopaste.snit.ch/ (ask TonyC for new channels) or http://rafb.net/paste or http://paste.husk.org/ or http://poundperl.pastebin.com/ or http://paste.scsys.co.uk/ or don't bother me while I'm eating
17:26 pmichaud my report is simply that I worked on closing out old tickets, especially RT#48028 (converting P6Regex to Perl6Regex)
17:27 nopaste "tene" at 166.70.38.237 pasted "open()" (8 lines) at http://nopaste.snit.ch/12470
17:28 rgrjr joined #parrot
17:29 rdice joined #parrot
17:36 Tene With 'List' being set up as a subclass of ParrotIO
17:42 pmichaud do the synopses discuss Perl 6 IO yet?
17:43 PerlJam pmichaud: I don't think so (other than to say such a built-in class exists)
17:44 Coke tene: OOC, have you done an update since the pdd17 merge?
17:44 TimToady there's a draft of S16 in pugs/docs/Perl6/Spec/IO.pod
17:44 pmichaud ah
17:44 pmichaud follow the draft :-)
17:44 pmichaud TimToady++
17:45 TimToady I am unlikely to make the phone call tomorrow, btw
17:45 Tene Coke: no, not yet.  I should.
17:45 TimToady having tranfusions later today, and endoscopy sometime tomorrow, most likely
17:45 particle TimToady: good to know, i'll make sure it gets relayed
17:45 pmichaud I will probably miss it also -- I forgot about the time change when scheduling this week
17:46 TimToady particle: thanks
17:46 pmichaud (I didn't forget about the time change for parrotsketch, but did for the call)
17:46 particle if you put the phone on mute, we can minute the endoscopy
17:46 Coke <shudder>
17:46 particle 'sokay, TimToady will be asleep
17:47 TimToady mostly...
17:47 TimToady one can remember it vaguely sometimes
17:47 pmichaud I think we should get TimToady's report anyway, and leave it to everyone to infer what should happen from the silence :-)
17:47 TimToady I have too much experience with this already...
17:48 pmichaud yes, I'm getting far more experience with health care than I ever wanted :-|
17:49 particle i've got plenty of experience myself, TimToady
17:50 particle you can expect you'll be the butt of all our jokes tomorrow, though
17:50 TimToady well, hopefully the stomach endoscopy will be sufficient
17:50 TimToady just as soon they stop there...
17:51 particle i know we all hope it'll be okay in the end
17:51 TimToady not fair to get into a punning war with someone who's effectively at about 12,000 ft altitude...
17:52 particle ok, i'll be at 12000 feet next week. let's talk :)
17:53 TimToady that would put me up at about 24000, which would not be pretty
17:53 pmichaud I'll probably be at 6000 or 7000 feet next week
17:54 particle pmichaud: where to?
17:54 purl to is Tonga Islands
17:54 particle TimToady: that's pretty near the death zone
17:54 particle maybe you should try scuba therapy
17:55 TimToady I don't think a scuba would fit.
17:55 barney joined #parrot
17:56 Tene I don't know if it's my C that's rusty or if I just don't understand the parrot guts yet.
17:56 TimToady if the guts are leaking red stuff it's probably not rust...
18:07 nopaste "tene" at 166.70.38.237 pasted "broken IO for rakudo" (109 lines) at http://nopaste.snit.ch/12471
18:09 Tene assign_pmc() there was cargo-culted from assign_pmc() in sub.pmc and from clone() in parrotio.pmc
18:09 Tene It results in a double free on termination if you actually use it.
18:09 Tene And probably some other horrible things.
18:10 purl joined #parrot
18:15 chromatic joined #parrot
18:17 Coke uhoh. You've summoned the sleepth chromatic.
18:17 Coke "sleepth"!? fingers, you need better autocorrection.
18:17 Tene Quick, hide the segfaults!
18:25 chromatic #ps in 5
18:26 Tene Okay, yeah, the main problem is that I suck at C.
18:26 Tene I need to fix this.
18:30 chromatic #ps time
18:36 Psyche^ joined #parrot
18:45 IllvilJa joined #parrot
18:51 Coke holy inconvenient timing, batman.
18:52 chromatic I blame society.
18:59 Tene particle: just tell me what I need to do and I'll see what I can do with it.
18:59 Coke tene: ww.
18:59 Coke chromatic: it's a fair cop
18:59 Tene Coke: expand that please
18:59 spinclad purl, ww?
18:59 purl ww is wrong window
19:00 particle tene: will do. i'll get in touch with jmcadams and we'll start the process rolling on the list
19:00 Coke or not. just seemed like were just having that convo in #ps.
19:00 Tene Coke: seemed like time to move it out of that channel.
19:03 Ron joined #parrot
19:03 Coke fairnuff
19:04 cotto_work allison, do you know the time and building when you're speaking at the MS campus yet?
19:05 allison cotto: the time is 10am, I don't know the building yet, and John Lam was on vacation last week. Will check again.
19:11 Coke second!allInFavor!Aye! *scatter*
19:11 spinclad Coke: ww
19:11 Coke no, it was intentional. =-)
19:11 Coke but thank you.
19:11 spinclad standing vote to adjourn!
19:14 b2gills joined #parrot
19:14 buchetc joined #parrot
19:15 Coke ... I used to run meetings for my fraternity in college; I still have the opening speech  memorized. I want those brain cells back. (the three sharp taps of the gavel signify the three-fold purpose of this meeting...)
19:15 chromatic I read two pages in Roberts Rules once.
19:17 Coke barney: I found it takes the longest to make sure News is up to date if others haven't done it piecework before the release.
19:17 Coke I'd block out ... meh, 2 hours? (less if you have a fast machine to run 'make fulltest' on.)
19:18 barney That's good. I can check the changelogs on the weekend.
19:18 barney On tuesday I probably can leave $WORK early.
19:19 Coke Yah; I used to do a 'svn log' since last release and try to keep it up to date on a weekly basis, but it's a PITA.
19:19 Coke nice when all that work happens in a branch and you get one summary commit to trunk. =-)
19:19 barney allison++
19:22 spinclad do we have a good blurb on the pdd17 changes to point to?  (other than the pdd itself)
19:22 spinclad (do we need one)
19:22 spinclad s/)/?)/
19:23 Coke I think the news bullet point can be "implemented PDD17" - we can write up something more for the press release, though.
19:23 chromatic I'm not sure people reading the press release who aren't already on this channel right now will care.
19:24 Coke I tend to agree, but I also know I undervalue marketing.
19:25 allison we can do a quick set of bullet points to include in release messages
19:26 allison (or just mention the top 3 features in the one bullet point)
19:26 particle stick it in NEWS
19:27 Coke chromatic: ... damnit, I seem to be fresh out of segfaults for you.
19:27 Coke in an effort to get you more, I'm re-running the official tcl test suite.
19:28 rgrjr barney:  fwiw, i took the whole tuesday off $work, and was glad i did.
19:28 rgrjr barney:  it took 11H, after writing news.  next time faster, i hope.
19:28 Coke URK.
19:29 skids chromatic: no go on smoke on PA-RISC -- won't even get all the way through make.  Something about casts changing alignment requirements (scads of same warning).  Have yet to delve.
19:29 gryphon joined #parrot
19:31 * barney will get an early start from European timezone
19:31 * chromatic wonders if there's an alignment problem in PObj, Buffer, STRING, and PMC.
19:40 nopaste "barney" at 84.58.154.103 pasted "deprecated PIR syntax ?" (35 lines) at http://nopaste.snit.ch/12473
19:41 spinclad allison: in pdd17:77 and :79, C<u> should be C<cache>?
19:41 chromatic barney, the first two should be deprecated.
19:42 chromatic spinclad, yes.
19:42 allison spinclad: yes
19:43 Coke allison: src/pmc/object.pmc has a double /* /* and some commented out code.
19:43 Coke er, allison & chromatic .
19:44 chromatic Line?
19:45 allison while resolving conflicts last night, I also noted src/pmc/namespace.pmc has an extra comment open on line 551
19:45 chromatic Coke, in the freeze() entry?
19:46 Coke chromatic: yes.
19:46 Coke Saw the compiler warning, wasn't sure if the right thing to do was rip out the entire entry.
19:49 jonathan hi all - sorry I missed #ps and for general not being around. Had folks visiting for the last week, and $DAYJOB is busy...
19:49 Coke jonathan: if you have a report, feel free to paste it into #ps.
19:49 Coke jonathan: and no worries.
19:49 chromatic Coke, that looks like Allison's code.  I only remember fixing the PBC tests after she kept changing freeze/thaw.
19:49 jonathan Coke: Not really, I've done nothing Parrot/Rakudo related for the last week.
19:50 jonathan Saw someone reverted one of my patches, though. ;-)
19:50 allison chromatic: line#?
19:50 allison jonathan: was that does does_pmc?
19:51 chromatic src/pmc/object.pmc:605
19:52 jonathan allison: Yeah.
19:52 gbacon joined #parrot
19:52 jonathan I put it in to get smartmatch on roles working in Rakudo.
19:52 jonathan I thought I'd covered all the bases and nothing was failing...alas, it seems not.
19:53 cognominal jonathan, can you review and check in my patch  http://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=51350
19:54 cognominal I corrected and extended your stuff about pairs
19:54 allison coke: it's been like that as long as we've been running on the new object stuf
19:54 allison see r22180, where we reintegrated the pdd15oo branch
19:55 cognominal I am trying to do a lexical self to be able to access it in inner block but so far I fail
19:55 allison also, looking at the code, it wouldn't work under the current implementation
19:55 jonathan cognominal: Great, thanks; will take a look shortly I hope; kinda snowed under right now. :-(
19:55 Coke allison: then by all means lets rip it out.
19:55 allison VTABLE_elements doesn't return the number of slots in the attribute data array
19:55 allison coke: yes, delete it
19:55 Coke k. I'm on it.
19:56 jonathan allison: Did the does stuff end up back in when the pdd17 branch was merged?
19:56 jonathan I read it was fixed in the branch...
19:56 allison jonathan: yes, it's there now
19:56 jonathan OK, great.
19:57 b2gills I wonder if anyone has information about cross compiling a WIN32 parrot on a linux distribution, I already have the MingW GCC.
19:57 * Coke needs to update the binary search app to allow the ability to ignore certain versions as not counting.
19:57 jonathan Will hopefully be back and looking at more stuff shortly...like after this week's $DAYJOB madness ends.
19:58 buchet joined #parrot
20:04 jrt4 joined #parrot
20:04 spinclad pdd17: does C<resolves> take one argument, an element to resolve, or does it declare all conflicting elements resolved?
20:04 Coke b2gills: I don't think anyone has done a cross compile yet.
20:05 Coke I know lathos is trying so he can run parrot on the iPhone.
20:05 spinclad (a question for the list, i'll take it there)
20:08 b2gills I want to make it so that parrot won't lock up when doing the wspawn test on Win9x
20:09 * Coke tries to remember to only ever run coretest. Oy.
20:11 Infinoid the whole "Parrot for small platforms" thing from PDD01 is vapor, right?  it says its not a requirement of the 1.0 release.
20:14 spinclad pdd17: other modifiers apparently taking an argument: provides, hll, maps.
20:15 Coke short version: yes, vapor.
20:15 Coke long version: but we wannnnnna!
20:15 Infinoid yeah, it sounds like fun :)
20:16 Coke There is a google calendar for parrot. Need to share it amongst more people for editing to make it useful.
20:18 Infinoid chromatic's answer was better than mine :)
20:21 spinclad pdd17:238: 'attribue'
20:21 spinclad 239: 'throught'
20:22 spinclad (conservation of 't's)
20:23 Tene But what symmetry does that conservation law come from?
20:23 chromatic patch: **** Only garbage was found in the patch input.
20:23 peeps[work] joined #parrot
20:24 spinclad Tene: phase shift of 2pi*hbar across each t
20:27 spinclad or better, isomorphism under shift of t
20:31 spinclad (hm.  conservation of time: invariance under shift in energy)
20:33 * Tene harasses someone to look at the parrotio.pmc part of http://nopaste.snit.ch/12471
20:34 svnbotl r26317 | bernhard++ | trunk:
20:34 svnbotl : #42769: Remove unneeded type names from PIR
20:34 svnbotl : Avoid deprecated PIR syntax.
20:34 svnbotl r26318 | coke++ | trunk:
20:34 svnbotl : [codingstd]
20:34 svnbotl : Eliminate method that had a completely commented out body.
20:34 svnbotl : Found because the compiler warned about the /* /* */ comment.
20:34 svnbotl diff: http://parrotvm.org/svn/parrot/revision/?rev=26318
20:34 chromatic Tene, it looks compilable.
20:34 chromatic I don't understand the base_type comparison completely.
20:35 Tene I copied it from one of the other pmcs.  I end up with a corruption or double free on exit after using an IO object with that patch.
20:36 chromatic I'm not surprised.
20:36 chromatic One of those PMCs will free its PMC data before the other does.
20:37 Tene That's what I thought.
20:38 Tene So I need to memcpy it, but I'm still trying to figure out what exactly I'm copying, and so what size to copy.
20:38 chromatic The naive approach is to clone the other PMC, assign the pointers, and then unset any custom destroy flag on the PMC.
20:39 chromatic On the clone, I mean.
20:39 chromatic The GC will reclaim it during the next sweep, but it won't free its PMC data.
20:39 chromatic It's fine for multiple PMCs to share pointers, as long as only one ever tries to free it.
20:40 chromatic (Of course, if we only ever allocated memory from GCable pools, we wouldn't have this problem.  We'd have at least two different problems.)
20:43 marmic joined #parrot
20:44 svnbotl r26319 | coke++ | trunk:
20:44 svnbotl : [codingstd]
20:44 svnbotl : Remove unused variables.
20:44 svnbotl diff: http://parrotvm.org/svn/parrot/revision/?rev=26319
20:47 Coke I'm guessing we want to eventually remove all #if 0    blocked out code, also.
20:50 nopaste "tene" at 166.70.38.237 pasted "broken IO for rakudo" (112 lines) at http://nopaste.snit.ch/12475
20:51 Tene Hm, should have changed the title.
20:51 pmichaud shouldn't 'open' be a method?
20:52 pmichaud (warning: haven't read synopsis draft yet)
20:52 Tene pmichaud: there's also a method
20:52 pmichaud ah.  In general 'open' (the sub) should call the method
20:53 pmichaud but there are exceptions.  anyway, I've been aiming to try to make most things method-based
20:53 Tene pmichaud: and what would it be calling the method on if there's no object yet?
20:53 pmichaud does open() return an IO object?
20:54 Tene Do I need to call anything other than PObj_active_destroy_CLEAR to unset custom destroy flags?
20:55 Tene pmichaud: I thought so, but I'm not certain.  Perhaps I should check before I spend more time on this.
20:56 pmichaud the IO.pod draft says that most items are methods on an IO handle, and corresponding global functions are really exported versions of the method
20:56 pmichaud however, it also says:   my $fh = open($filename);
20:56 pmichaud so... I dunno
20:57 pmichaud maybe 'open' falls outside of 'most items'
20:57 Tene Probably does.  I see 'open' as more of a constructor.
20:57 pmichaud (constructors/creators are often that way)
21:02 Tene I'm still getting a double free with PObj_active_destroy_CLEAR on a clone... maybe that's not clearing what I need to clear.
21:11 Tene No, that's the same operation I'm seeing elsewere in src/
21:12 chromatic Look at copy in src/ops/set.ops
21:13 Tene That's where I copied it from.
21:14 chromatic Is there something freeable in PMC_struct_val too?
21:15 Tene I don't know.  I should probably find out what that is, anyway.
21:16 chromatic Look in the mark() vtable entry.
21:19 Tene Parrot_default_mark is saying that it uses a default mark(), yes?
21:19 chromatic Does this PMC not have a separate mark?
21:19 Tene It does not.
21:20 chromatic Then it's probably not that.
21:20 chromatic Can you get a backtrace of the double free?
21:23 nopaste "tene" at 166.70.38.237 pasted "broken IO for rakudo" (28 lines) at http://nopaste.snit.ch/12476
21:23 Tene Ack, forgot to change the title again
21:25 chromatic Maybe assign NULL to PMC_data and PMC_struct_val in the clone instead of clearing the destroy flag.
21:29 Tene Looks like still a double free.  Let's see if it's the same bt.
21:33 Tene Yeah, still through PIO_destroy, which is in src/io/io.c and is called by parrotio's destroy()
21:33 Tene PMC_data0() ?
21:35 chromatic What's the actual pointer that causes the double free?
21:36 Tene (ParrotIO *)PMC_data0(pmc);
21:38 Tene Which is called on the pmc being destroyed.
21:42 sjansen joined #parrot
21:42 chromatic ... which is in PMC_ext
21:43 jrt4 I'm looking in Parrot_readbc() right now, and when it calls Packfile_new(),  PackFile_set_header() sets up the packfile header, but then, when we get into Packfile_unpack() it memcpy()s the header info from the PBC into the Packfile header again, overwriting what we put in the header in Packfile_new(). Why is it setting up the header twice?
21:43 chromatic It's the same as PMC_data, but it evaluates to 0.
21:45 Tene Looks like I still get a double free when I set clone->pmc_ext = NULL
21:49 Tene ... oh, the problem is that ParrotIO's clone() just copies pointers.
21:49 chromatic Ah.
21:49 chromatic I assumed it did the right thing.
21:54 chromatic jrt4, no idea.  leo might know.
21:55 jrt4 chromatic: OK, thanks.
21:57 kj joined #parrot
22:11 davidfetter joined #parrot
22:21 Tene segfaults yay!
22:27 teknomunk_ joined #parrot
22:49 Limbic_Region joined #parrot
22:53 kid51 joined #parrot
22:53 Tene So, it's the IO stream that's getting double-free'd.
22:54 Tene A copy of an IO object probably should share the same IO stream, though, right?
22:56 chromatic Probably.
22:56 purl Really? Probably? Are you Certain it's not certain? Are you sure it's unsure? I think you need to look harder.
22:59 Tene So ParrotIO's destroy() is flush()ing and close()ing the stream, then calling PIO_destroy() on it.
23:02 chromatic Should we dup the stream, or will that help?
23:05 Tene What happens when you close() a dup'd fd?
23:06 chromatic Well you can have multiple fds open to the same file, so I assume the kernel knows what to do.
23:07 Tene Okay, so we probably need to dup the stream on clone.
23:12 ewilhelm but multiple fd's is a result of multiple opens, no?
23:13 chromatic I'm not sure the kernel cares.
23:14 chromatic fds persist across fork() too.
23:19 skids joined #parrot
23:28 Tene Does PIO_dup in src/io/io.c sound sane?
23:29 chromatic It does, if it works.
23:30 chromatic I *think* it will work.
23:30 chromatic IO is not my gig though.
23:32 Tene That's what 'make test' is for. :)
23:38 Tene I'm unsure if I need to do anything special to handle network sockets.
23:42 chromatic Not on Unix.
23:42 Infinoid sockets behave the same as files
23:42 Infinoid what kind of clone() are you doing?  are you spawning a thread, or doing a fork()?
23:45 Infinoid duplicating the data structure?
23:47 wknight8111 joined #parrot
23:47 Tene Infinoid: dup'ing a stream for ParrotIO's clone()
23:48 Infinoid ok.  (I was confused by the linux syscall of the same name, upon which fork() and pthread_create() are implemented.)
23:48 Infinoid in that case, you definitely want to do a dup(), but note that duplicated fds generally have weird behavior
23:49 Infinoid dup() and dup2() on linux result in 2 fds that behave interchangeably... doing a seek on one affects the other
23:50 Infinoid and you probably should flush any pending output before doing the dup, otherwise it'll end up being written twice
23:51 Tene that weird behavior is exactly what we want.
23:52 Infinoid the kernel does some refcounting magic and only destroys its data structures once the last fd is closed.
23:53 nopaste "tene" at 166.70.38.237 pasted "PIO_dup" (21 lines) at http://nopaste.snit.ch/12477
23:54 Infinoid I can't speak for the portability of dup()
23:54 chromatic I'd use PMC_data_typed() instead of PMC_data0(), and you can remove the curlies... otherwise looks fine, pending Infinoid's concern.
23:55 chromatic man dup here says "      SVr4, 4.3BSD, POSIX.1-2001."
23:55 Infinoid yeah
23:56 Infinoid I have no idea how to do this on win32
23:57 chromatic That's one reason I keep the Perl 5 sources around.

| Channels | #parrot index | Today | | Search | Google Search | Plain-Text | summary

Parrot | source cross referenced