From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f170.google.com (mail-we0-f170.google.com [74.125.82.170]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 767BB7842C for ; Sun, 9 Feb 2014 03:11:15 -0800 (PST) Received: by mail-we0-f170.google.com with SMTP id w62so3497012wes.29 for ; Sun, 09 Feb 2014 03:10:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=dzm2Lbi6SLXI+zPmCj9o2iFORFarcBCE5F5CpOnXKT0=; b=LHflTl+Jb6NWmzDYo2+niikUBFQGclMoOvr/WSJk7TdcsQa5oK8exAWFtcd/QqwT3w g6joqaKV3cFsh7tLNGq6eDzbJ0dsIhTaBNG1l1eOaFzgBfaxbsQ0eQnhLpJY7GzkpFbE OfpSk/FkA9CYhgnKAQFVupDTo2S9TmKbWcES3B5bE5yioaM+Fk9HKtOKeQCjkKFAlaxx KJWGSBKmJdcvmARZno1/B7DZvxOJ5VV+71s5qCr9SiIb895lbKBrnYScYKZAygFR/Ifm ECS147hz/G1J1uIKVIgpCd4H4livB+DgAix1B4BlJ3UnTWQSSMsqedp+V8qaoUaOxY7z b1XQ== X-Received: by 10.180.189.169 with SMTP id gj9mr6519170wic.17.1391944233505; Sun, 09 Feb 2014 03:10:33 -0800 (PST) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id fo6sm25817425wib.7.2014.02.09.03.10.31 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 09 Feb 2014 03:10:32 -0800 (PST) Date: Sun, 9 Feb 2014 11:10:29 +0000 From: Adam Thompson To: Chris Brannon Message-ID: <20140209111029.GC11542@toaster.adamthompson.me.uk> References: <20140107125753.eklhad@comcast.net> <87vbwqg4ty.fsf@mushroom.PK5001Z> <20140209104525.GB11542@toaster.adamthompson.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140209104525.GB11542@toaster.adamthompson.me.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] Error Legs X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.17 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 11:11:15 -0000 On Sun, Feb 09, 2014 at 10:45:25AM +0000, Adam Thompson wrote: > On Fri, Feb 07, 2014 at 10:23:05AM -0800, Chris Brannon wrote: > > Karl Dahlke writes: > > > My gut tells me the segfaults might come from somewhere else. > > So it is failing with out-of-memory in this case. I'm sure youtube is a > > very JS-intensive site, but could there be another reason for the memory > > exaustion? I don't know. > > Not sure, we really need to go through everything and ensure that what needs to > be rooted is and what doesn't isn't. > Incidentally I bumped my jspool limit up to 64 meg and that example works now. > Really it'd be much nicer if we could get js to dynamically grow to deal with > this (with an *optional* limit). > > I'd still prefer it if it just killed the offending context as well > (js_DestroyContext and js_GC?). This should mean that everything else can > continue and we reclaim the lost memory, > or in the worst case just the js side is broken. > Either way, it allows the user to save critical work, bookmark pages etc. > At the moment, although I agree that not segfaulting is much nicer, > the overall outcome is the same; edbrowse goes away taking your unsaved work > and other browsing sessions with it. > I can try and implement this if people agree. Looking at the docs it looks like this can't be done inside the error reporter, and at any rate, I've still seen (whilst trying to browse the docs) more js-related segfaults (with no helpful errors though). All this is pushing me back to doing the error leg stuff properly rather than in the error reporter. That, and the fact that according to the docs, any function which returns a value and takes a js context pointer can (depending on return) return either false or NULL to indicate failure. I assume by this they mean they're not going to make explicit the failure conditions for these functions, just that failure is always an option in these cases. They do also say that such failures aren't always due to out of memory conditions, and may be due to such things as syntax errors etc. Cheers, Adam.