Closed Bug 539720 Opened 15 years ago Closed 14 years ago

cachedNewlineOffset can end up uninitialized

Categories

(Core :: Layout: Text and Fonts, defect, P1)

x86
macOS
defect

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- alpha1+

People

(Reporter: bzbarsky, Assigned: roc)

References

Details

(Keywords: valgrind)

Attachments

(1 file)

valgrind says:

==25133== Conditional jump or move depends on uninitialised value(s)
==25133==    at 0x52E58F0: nsTextFrame::Reflow(nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) (nsTextFrameThebes.cpp:6501)

That line is:

6501   } else if (cachedNewlineOffset) {

Is cachedNewlineOffset supposed to be initialized to null, perhaps?
Attached patch fixSplinter Review
Er, yeah. (Fortunately, if it's non-null garbage then we just do an unnecessary RemoveProperty call.)
Attachment #421694 - Flags: review?(bzbarsky)
Attachment #421694 - Flags: review?(bzbarsky) → review+
Whiteboard: [needs landing]
Keywords: valgrind
blocking2.0: --- → ?
blocking2.0: ? → alpha1
Priority: -- → P1
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: