Closed Bug 841759 Opened 11 years ago Closed 11 years ago

BaselineCompiler: Correctly handle situation where getStubCode() on an IC compiler fails.

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: djvj, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

If for whatever reason ICBlah_Blah::Compiler::getStubCode() fails, then the getStub() method will silently pass the NULL IonCode pointer returned by getStubCode() into a newly allocated stub, where it will cause a null-deref when the native address is attempted to be retrieved.

Needs fixing.
Attached patch Fix.Splinter Review
I wish I could just make the allocator do this.  With variadic templates in C++ we can make this a whole lot cleaner.. but this is the redundant stuff we need otherwise.
Attachment #718709 - Flags: review?(jdemooij)
Comment on attachment 718709 [details] [diff] [review]
Fix.

Review of attachment 718709 [details] [diff] [review]:
-----------------------------------------------------------------

Makes sense.
Attachment #718709 - Flags: review?(jdemooij) → review+
https://hg.mozilla.org/projects/ionmonkey/rev/987e7a479c76
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: