IonMonkey: Assertion failure: !ranges_.empty(), at js/src/ion/LinearScan.h:289

RESOLVED FIXED

Status

()

Core
JavaScript Engine
--
major
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: decoder, Assigned: jandem)

Tracking

(Blocks: 2 bugs, {assertion, testcase})

Other Branch
x86_64
Linux
assertion, testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
The following testcase asserts on ionmonkey revision f46cfb199e77 (run with --ion -n -m --ion-eager), tested on 64 bit:


function Day( t ) {}
function DayFromYear( y ) {}
function YearFromTime( t ) {
  for ( var timeToTimeZero = t; ;  ) {  }
}
function MonthFromTime( t ) {
  return( Day(t) - DayFromYear(YearFromTime(t)));
}
addNewTestCase( "TDATE = new Date(0);(TDATE).setFullYear(1969);TDATE",
		UTCDateFromTime(SetFullYear(0,1969)),
		LocalDateFromTime(SetFullYear(0,1969)) );
function addNewTestCase( DateString, UTCDate, LocalDate) {}
function UTCDateFromTime(t) {}
function SetFullYear( t, year, mon, date ) {
  var T = addNewTestCase ? 0 : LocalTime(t) ;
  var MONTH = ( mon == void 0 ) ? MonthFromTime(T) : Number( mon );
}
(Reporter)

Updated

5 years ago
Summary: Assertion failure: !ranges_.empty(), at js/src/ion/LinearScan.h:289 → IonMonkey: Assertion failure: !ranges_.empty(), at js/src/ion/LinearScan.h:289
(Assignee)

Comment 1

5 years ago
Created attachment 594955 [details] [diff] [review]
Patch

Almost all scripts have an MReturn or MThrow and therefore fixedIntervalsUnion usually has at least one range. There's an edge case though: infinite loops. The patch adds a small range to fixedIntervalsUnion to handle this (rare) case so that the allocator does not have to guard against this.

I can't add the testcase since it iloops and we don't support interrupts.
Assignee: general → jdemooij
Status: NEW → ASSIGNED
Attachment #594955 - Flags: review?(dvander)
Attachment #594955 - Flags: review?(dvander) → review+
(Assignee)

Comment 2

5 years ago
https://hg.mozilla.org/projects/ionmonkey/rev/c34398f961e7
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.