edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Adam Thompson <arthompson1990@gmail.com>
To: Chris Brannon <chris@the-brannons.com>
Cc: edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] garbage collection1
Date: Fri, 24 Jan 2014 10:59:29 +0000	[thread overview]
Message-ID: <20140124105929.GC12450@toaster.adamthompson.me.uk> (raw)
In-Reply-To: <87lhy6qw9t.fsf@mushroom.PK5001Z>

On Thu, Jan 23, 2014 at 12:27:10PM -0800, Chris Brannon wrote:
> I'm more and more convinced that the JavaScript crashes are related to
> GC and rooting, as Adam suspected.  The crashes I'm seeing are occurring
> in jsdom.c, and they seem to involve corruption of the JS heap, not the
> heap used for edbrowse strings and other data.
> Example: this one at line 1185 of jsdom.c from master:
> 	    v = JS_NewObject(jcx, cp, NULL, owner);
> One of the pointers passed in is apparently pointing to something that
> was freed long ago.  I don't think it's jcx or cp, so it must be owner.

If I remember correctly this is in domLink,
which I had to fix to get edbrowse passed linking the body tag.

I've *hopefully* fixed the uo rooting (thanks for noticing that,
I'd removed the rooting when I ran into the NULL pointer problem but never put it back).

> So let's switch gears.  I've been working with Adam's code, and it still
> has GC / rooting issues.  From what I can tell, JS_DefineProperty can
> trigger a GC.  We should not be passing unrooted jsval as the fourth
> argument to JS_DefineProperty as this can also lead to a crash.

Yeah, I'm not sure how to work around this.

If you could test the latest code that'd be useful (corrected jwin and uo rooting).
I'm not sure it fixes the event handler bug,
but it's hopefully a step closer to stability.

Cheers,
Adam.

  reply	other threads:[~2014-01-24 10:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 20:27 [Edbrowse-dev] garbage collection Chris Brannon
2014-01-24 10:59 ` Adam Thompson [this message]
2014-01-24 14:21   ` [Edbrowse-dev] garbage collection1 Chris Brannon
2014-01-24 14:58     ` Adam Thompson
2014-01-24 22:07       ` Chris Brannon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140124105929.GC12450@toaster.adamthompson.me.uk \
    --to=arthompson1990@gmail.com \
    --cc=chris@the-brannons.com \
    --cc=edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).