From: Chris Brannon <chris@the-brannons.com>
To: edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] my very large patch
Date: Sat, 25 Jan 2014 14:46:37 -0800 [thread overview]
Message-ID: <87ob2zof1u.fsf@mushroom.PK5001Z> (raw)
Ok, it is done.
I think it is too big to send to the list, so here's a link:
http://the-brannons.com/js.patch
The commit message should be a pretty good description of what I've
changed, so I won't rehash it here unless someone has questions.
I may have made mistakes along the way as well. It's quite possible
that I forgot to use JSAutoCompartment in some places where it is needed.
html.cpp is now compilable with g++, but it requires the -fpermissive
switch. Turns out that g++ doesn't like Karl's list macros from eb.h,
because of the use of void pointers. Since html.cpp is now in C++, it
might be a good idea to rewrite the list manipulations to use the list
type from C++'s standard template library. But not today.
So after doing all that work, I fired up my shiny new edbrowse, and I
eventually managed to make it crash. Turns out that in some cases, it
has nothing to do with GC at all.
The problem is that in a lot of instances, we do not check the return
value of JS_NewObject, and it will return NULL on an error (such as heap
exaustion). JS_NewObject returned NULL somewhere, and a bit later on in
the program, a crash ensued because that NULL got passed to
a function that expected a non-NULL.
The JS heap is too small.
The patch is still necessary, though.
-- Chris
next reply other threads:[~2014-01-25 22:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-25 22:46 Chris Brannon [this message]
2014-01-26 23:52 ` Adam Thompson
2014-01-27 0:49 ` Adam Thompson
2014-01-27 1:22 ` Chris Brannon
2014-01-27 10:35 ` [Edbrowse-dev] my very large patch1 Adam Thompson
2014-01-27 12:29 ` [Edbrowse-dev] my very large patch Adam Thompson
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=87ob2zof1u.fsf@mushroom.PK5001Z \
--to=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).