Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dillo on RPI



jun%soum.co.jp@localhost (Jun Ebihara) writes:

>From: Nick Hudson <skrll%netbsd.org@localhost>
>Subject: dillo on RPI [was Re: [6.99.39->40] NetWalker ld0 bus clock]
>Date: Wed, 16 Apr 2014 15:07:25 +0100

>>> I've put my testing image to
>>> ftp://ftp.netbsd.org/pub/NetBSD/misc/jun/raspberry-pi/2014-04-13-netbsd-raspi.img.gz
>>> 1. dd if=2014-04-13-netbsd-raspi.img.gz of=/dev/your_card..
>>> 2. boot on RPI
>>> 3. login: root   (no password)
>>> 4. startx
>>> 5. dillo
>>>    and core dumps.
>>> On using same image,dillo works fine on NetWalker.
>> I took a quick look and it seems a valid FP exception and core
>> dump. Could there be a configuration problem?
>> Having debug information and sources included in the image would help
>> a lot. Is that possible?

>Thanx nick, Every pkg binary depend on pkgsrc tree including my image.
># cd /usr/pkgsrc/www/dillo
># make package

The VFP exception code in the kernel is quite incomplete.
dillo now crashes because it does a zero/zero division in calculating
HTML tables, which now traps. This happens in the default splash
page that dillo presents on startup.

Here is a patch for dillo that avoids division by zero in this case:

--- dw/table.cc.orig    2014-02-08 20:07:00.000000000 +0100
+++ dw/table.cc 2014-04-21 10:56:49.000000000 +0200
@@ -956,7 +956,7 @@
       _MSG("APP_P, perAvailWidth=%d, sumMaxWidth=%d\n",
           perAvailWidth, sumMaxWidth);
 
-      for (int col = 0; col < numCols; col++) {
+      for (int col = 0; col < numCols && sumMaxWidth > 0; col++) {
          int max_wi = colExtremes->getRef(col)->maxWidth, new_wi;
          if (!core::style::isAbsLength (colPercents->get(col))) {
             new_wi =
@@ -1004,10 +1004,12 @@
             // only percentage columns, or cumPercent < 100% => restrict width
             int totW = (int)(sumMaxNonPer / (1.0f - cumPercent));
             for (int col = 0; col < numCols; col++) {
-               totW = misc::max
-                  (totW,
-                   (int)(colExtremes->getRef(col)->maxWidth
-                         / core::style::perLengthVal (colPercents->get(col))));
+               int colLen = core::style::perLengthVal(colPercents->get(col));
+               if (colLen > 0) {
+                  totW = misc::max
+                     (totW,
+                      (int)(colExtremes->getRef(col)->maxWidth / colLen));
+               }
             }
             totalWidth = misc::min (totW, totalWidth);
          }
@@ -1048,7 +1050,7 @@
          }
       }
 
-      if (cumPercent < 0.99f) {
+      if (cumPercent > 0 && cumPercent < 0.99f) {
          // Will have to apportion the other columns
 #ifdef DBG
          MSG("APP_P, extremes: ( ");



Home | Main Index | Thread Index | Old Index