Closed Bug 432869 Opened 16 years ago Closed 16 years ago

Divide by zero [@ IsProbablyForLayout]

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1a1

People

(Reporter: aaronlev, Assigned: aaronlev)

References

()

Details

(Keywords: access, verified1.9.0.2)

Attachments

(1 file)

Summary: Divide by → Divide by zero in IsProbablyForLayout()
Attachment #320035 - Flags: review?(surkov.alexander)
Comment on attachment 320035 [details] [diff] [review]
Never divide by 0 !

>     // See bug 376803.
>     *aState |= nsIAccessibleStates::STATE_FOCUSABLE;
>+    if (gLastFocusedNode == mDOMNode) {
>+      *aState |= nsIAccessibleStates::STATE_FOCUSED;
>+    }

it seems that's from another bug, otherwise r=me
Attachment #320035 - Flags: review?(surkov.alexander) → review+
Should  we nominate this for a potential RC2?
Marco, there is no risk with this bug. I recommend it for RC2.

Surkov, you're right that piece was from a different bug.
Nominating for inclusion into RC2, if we have one.
Whiteboard: [has-patch,has-review,consider-for-potential-rc2]
Whiteboard: [has-patch,has-review,consider-for-potential-rc2] → [has-patch,has-review][RC2?]
Attachment #320035 - Flags: approval1.9?
Whiteboard: [has-patch,has-review][RC2?] → [has-patch,has-review][RC2-]
Flags: blocking1.9.0.1?
Aaron, Surkov, any thoughts on an HTML construct that could provoke this bug? I would want to put a test to this bug if possible.
Blocks: 191a11y
Pushed to mozilla-central in changeset:
http://hg.mozilla.org/mozilla-central/index.cgi/rev/453d67321c76

Leaving open for possible inclusion in 1.9.0.x.
Perhaps a <table> inside of an iframe with visibility:hidden or that sets a 0 width

Pretty to hard to figure out how to repro.

But it's a safe fix.
Comment on attachment 320035 [details] [diff] [review]
Never divide by 0 !

This was harvested from crash-stats. Unfortunately the submitter did not leave a comment as to where the crashes happened. Probably a weird layout table of some sort.

As stated earlier, this is a safe fix that only makes sure we don't run into a divide by zero. Requesting that this be allowed to land on 1.9.0.1.
Attachment #320035 - Flags: approval1.9? → approval1.9.0.1?
Flags: wanted1.9.0.x+
Flags: blocking1.9.0.1?
Flags: blocking1.9.0.1-
Setting to resolved in accordance with rules laid out by Sam in mozilla.dev.planning. Fix was pushed to mozilla-central on June 11, see comment #7.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Attachment #320035 - Flags: approval1.9.0.1? → approval1.9.0.2?
Target Milestone: --- → mozilla1.9.1a1
Assignee: nobody → aaronleventhal
Comment on attachment 320035 [details] [diff] [review]
Never divide by 0 !

Approved for 1.9.0.2. Please land in CVS. a=ss

(Can we also get a test for this?)
Attachment #320035 - Flags: approval1.9.0.2? → approval1.9.0.2+
I tried a few things as suggested by Aaron in comment #8, but was unsuccessful in reproducing the crash. I tried a document with its width set to 0 and the table set to 85% of that, an iframe witha  width set to 0px, an iframe with visibility: hidden; or the like, but nothing of that sort crashed Firefox.
Checking in accessible/src/html/nsHTMLTableAccessible.cpp;
/cvsroot/mozilla/accessible/src/html/nsHTMLTableAccessible.cpp,v  <--  nsHTMLTableAccessible.cpp
new revision: 1.65; previous revision: 1.64
done
Keywords: fixed1.9.0.2
Finally got word of a testcase for this one, see URL field. It crashes upon load with Firefox 3.0.1, but no longer does with 3.1.
Summary: Divide by zero in IsProbablyForLayout() → Divide by zero [@ IsProbablyForLayout]
Whiteboard: [has-patch,has-review][RC2-]
I cannot get 3.01 to crash on http://www.markizatext.sk/. What OS are you using?
Al, the user who was reporting the website used either Windows XP or Windows Vista with the NVDA screen reader.
Do you have the NVDA screen reader, Marco? I don't have any screen readers here (on Windows or otherwise set up).
Yes, I do have it. I cannot reproduce the crash in 3.0.2 or 3.1b1pre, but I saw a crash with it with 3.0.1.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: