Open Bug 1286763 Opened 9 years ago Updated 3 years ago

Canvas OOM crash after using 2GB+ of heap-unclassified memory when adding segments in infinite loop

Categories

(Core :: Graphics: Canvas2D, defect, P3)

47 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: johnflux, Unassigned)

Details

(Whiteboard: [gfx-noted])

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0 Build ID: 20160606113944 Steps to reproduce: Visit https://jsfiddle.net/oaj6pjz6/2/ Actual results: Firefox crashes Expected results: It shouldn't crash :)
The following code is infinite loop: > for(var x = this.minX + this.iteration; x <= this.maxX; x += this.iteration) { > context.lineTo(x, equation(x)); > } because the following variables are all 0. * this.minX * this.iteration * this.maxX So, it's creating a path with infinite segments, and hits OOM.
Summary: Zero-sized Canvas OOM crash after using 2GB+ of heap-unclassified memory → Canvas OOM crash after using 2GB+ of heap-unclassified memory when adding segments in infinite loop
Component: Untriaged → Canvas: 2D
Product: Firefox → Core
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.