Closed Bug 453565 Opened 16 years ago Closed 16 years ago

JSOP_IN's record method (and others) need to null-guard JSVAL_OBJECT-mapped types to prevent crashes [@ js_HasNamedProperty]

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9.1b2

People

(Reporter: brendan, Assigned: gal)

Details

(Keywords: crash, fixed1.9.1)

Crash Data

Attachments

(1 file)

We do not distinguish null from object types for a value v, since both have JSVAL_TAG(v) of 0. We abort in JSOP_IN's record method if rval is primitive, but that does not ensure it won't be null at runtime, on trace.

Should we distinguish null from object type? That, or emit a not-null guard. Coments?

/be
If we insert a dummy guard that forces all values on the stacks to be written out, we could catch the SIGSEGV instead of an actually NULL-pointer check.
Keywords: crash
Summary: JSOP_IN's record method (and others) need to null-guard JSVAL_OBJECT-mapped types → JSOP_IN's record method (and others) need to null-guard JSVAL_OBJECT-mapped types to prevent crashes [@ js_HasNamedProperty]
Probably we want null checks in the builtins for now. I think Andreas was warming up to null as distinct mapped type but that will take more work.

/be
arithfuzz hits this if I turn on some type-instability testing code.
Attached patch patchSplinter Review
Can't test this well since it throws a type error, so no test case for trace-tests.js
Assignee: brendan → gal
Attachment #348662 - Flags: review?(danderson)
Attachment #348662 - Flags: review?(danderson) → review+
Fixed in TM.

http://hg.mozilla.org/tracemonkey/rev/94a601112ceb
Flags: blocking1.9.1?
Priority: -- → P1
Target Milestone: mozilla1.9.1b1 → mozilla1.9.1b2
Fixed in the merge pushed by vlad on Nov 18 14:11:14 2008 -0800: http://hg.mozilla.org/mozilla-central/rev/e8ed5d4bf531
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: blocking1.9.1? → blocking1.9.1+
Resolution: --- → FIXED
Flags: in-testsuite-
Flags: in-litmus-
Crash Signature: [@ js_HasNamedProperty]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: