From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from qmta10.westchester.pa.mail.comcast.net (qmta10.westchester.pa.mail.comcast.net [76.96.62.17]) by hurricane.the-brannons.com (Postfix) with ESMTP id 493B677E2B for ; Tue, 22 Apr 2014 09:36:05 -0700 (PDT) Received: from omta05.westchester.pa.mail.comcast.net ([76.96.62.43]) by qmta10.westchester.pa.mail.comcast.net with comcast id t16Q1n0040vyq2s5A4akgn; Tue, 22 Apr 2014 16:34:44 +0000 Received: from eklhad ([68.84.191.77]) by omta05.westchester.pa.mail.comcast.net with comcast id t4aj1n01N1gep303R4akWx; Tue, 22 Apr 2014 16:34:44 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke User-Agent: edbrowse/3.5.1 Date: Tue, 22 Apr 2014 12:34:26 +0000 Message-ID: <20140322123426.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1398184484; bh=2FuUvItGBV7g14FW2QxU8s/l8g8M4xCQgDz1YcHKpaY=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=Z31kWpKB9EnVuvE7gcW3rEaQoT7eLOfXeaMUMTAYV9NyErCK5NTjVVue2Ndlmu4uK HF2WNG4g2bmLFPhLyv43dzVbcKqsHRV/augCK0OlsHAGoMkhEcMx5x0tlw2wLVviTb dvtHuI4lgdi3ovT2Sq33O7S3QPgSxSid4gmPN46kWo7Sr4spigkt2uFlLVdc/4vtyr euV51611aUdsogrEgc8g98u0PnHePYw/ivNG4dDBp5O4B6t4N1XyoCWtRJa3/JT+0S DEHTPCsO4ICXixJTU3+m5R1TNFvp08QutVlQEgw/jmTHH3BImVXTYXgN1dBfv+mN35 NPigMQhpN9rBA== Subject: [Edbrowse-dev] if then else X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Karl Dahlke List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 16:36:05 -0000 Ok, my last push changed over 400 lines of code. Really? Yes, and all bug fixes; some serious, serious enough to cause a segfault. What happened? My first mistake was in jsrt. I didn't include any tests for the URL class. That class is very special and very complicated, over a thousand lines of code. With no regression tests, bugs could creep in and nobody would know. And they did. My latest push adds tests for this class, so this won't happen again. See jsrt line 536. I'm not going to describe all the bugs, but here is a funny one. We had, for a long time, code like this: if(condition) do this else do that But no error legs in js was leading to nulls and segfaults, so we put in error legs all over the place. This we needed to do, and thanks to everyone for your help. There were so many, the process was rather mechanical, and understandably so. Just get er done. Thus the above code became: if(condition) if(do this and it fails) { js fail return } else if(do that and it fails) { js fail return } If you've studied formal language theory and compilers, then you know this is the region of the C grammar that is ambiguous. But the compiler doesn't tell you that, it just picks a derivation and marches on. Which one? Not the one we expect. I changed the code as below and several bugs went away. if(condition) { if(do this and it fails) { js fail return } } else { if(do that and it fails) { js fail return } } There were quite a few blocks like this. So there you go - bitten by the if else ambiguity of C. There were other bugs too, dealing with string allocation and a malformed url constructor. I think they are fixed now; jsrt passes anyways. I'm glad I cleaned all this up before release 3.5.1. Karl Dahlke