RESOLVED FIXED130279
Accessing __lookupGetter__ and __lookupSetter__ should not crash the VM when undefined
https://bugs.webkit.org/show_bug.cgi?id=130279
Summary Accessing __lookupGetter__ and __lookupSetter__ should not crash the VM when ...
Mark Lam
Reported 2014-03-14 19:22:38 PDT
If both the getter nor setter are not defined, accessing __lookupGetter__ and __lookupSetter__ will return undefined as expected. However, if the getter is defined but the setter is not, accessing __lookupSetter__ will crash the VM. Similarly, accessing __lookupGetter__ when only the setter is set will crash the VM. The reason is because objectProtoFuncLookupGetter() and objectProtoFuncLookupSetter() did not check if the getter and setter value is non-null before returning it as an EncodedJSValue. The fix is to add the appropriate null checks. ref: <rdar://problem/16316505>
Attachments
the patch. (5.24 KB, patch)
2014-03-14 19:29 PDT, Mark Lam
fpizlo: review+
Mark Lam
Comment 1 2014-03-14 19:29:01 PDT
Created attachment 226794 [details] the patch.
Filip Pizlo
Comment 2 2014-03-14 19:52:28 PDT
Comment on attachment 226794 [details] the patch. Awesome.
Mark Lam
Comment 3 2014-03-14 23:31:48 PDT
Thanks for the review. Landed in r165680: <http://trac.webkit.org/r165680>.
Note You need to log in before you can comment on or make changes to this bug.