WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
142547
ASAN_OPTIONS=allocator_may_return_null=1 needs to be set
https://bugs.webkit.org/show_bug.cgi?id=142547
Summary
ASAN_OPTIONS=allocator_may_return_null=1 needs to be set
Dana Burkart
Reported
2015-03-10 15:34:51 PDT
Alexey says: We have a test crash with ASan, because it tries to allocate too much, and ASan doesn't allow that. We need to change the default behavior: ==45420==WARNING: AddressSanitizer failed to allocate 0xffffffffaffff6a0 bytes ==45420==AddressSanitizer's allocator is terminating the process instead of returning 0 ==45420==If you don't like this behavior set allocator_may_return_null=1 ==45420==AddressSanitizer CHECK failed: /SourceCache/clang/clang-603.0.12/src/projects/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc:149 "((0)) != (0)" (0x0, 0x0)
Attachments
Set allocator_may_return_null=1
(987 bytes, patch)
2015-03-10 15:41 PDT
,
Dana Burkart
ap
: review-
Details
Formatted Diff
Diff
Set ASAN_OPTIONS in run-webkit-tests
(4.67 KB, patch)
2015-03-18 16:31 PDT
,
Dana Burkart
ap
: commit-queue-
Details
Formatted Diff
Diff
Fix style
(4.60 KB, patch)
2015-03-18 16:37 PDT
,
Dana Burkart
no flags
Details
Formatted Diff
Diff
Really fix style....
(4.60 KB, patch)
2015-03-18 16:39 PDT
,
Dana Burkart
no flags
Details
Formatted Diff
Diff
Address Alexey's concerns
(4.01 KB, patch)
2015-03-18 16:50 PDT
,
Dana Burkart
ap
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Dana Burkart
Comment 1
2015-03-10 15:35:25 PDT
<
rdar://problem/20111863
>
Dana Burkart
Comment 2
2015-03-10 15:41:01 PDT
Created
attachment 248365
[details]
Set allocator_may_return_null=1
Geoffrey Garen
Comment 3
2015-03-10 15:44:29 PDT
Comment on
attachment 248365
[details]
Set allocator_may_return_null=1 r=me
Geoffrey Garen
Comment 4
2015-03-10 15:44:42 PDT
Does this fix the plugin testcase?
Alexey Proskuryakov
Comment 5
2015-03-10 16:21:06 PDT
Comment on
attachment 248365
[details]
Set allocator_may_return_null=1 Sadly, I don't think that this is going to work - ASAN_OPTIONS is a runtime variable, not a build time one AFAIK.
Dana Burkart
Comment 6
2015-03-10 16:23:45 PDT
(In reply to
comment #5
)
> Comment on
attachment 248365
[details]
> Set allocator_may_return_null=1 > > Sadly, I don't think that this is going to work - ASAN_OPTIONS is a runtime > variable, not a build time one AFAIK.
Yeah, I misunderstood this. This is going to be more difficult since we don't actually set any ASan-specific settings at runtime, and will have to come up with some way to do this.
Dana Burkart
Comment 7
2015-03-18 16:31:09 PDT
Created
attachment 248981
[details]
Set ASAN_OPTIONS in run-webkit-tests
WebKit Commit Bot
Comment 8
2015-03-18 16:33:27 PDT
Attachment 248981
[details]
did not pass style-queue: ERROR: Tools/Scripts/webkitpy/common/asan/utils.py:32: expected 2 blank lines, found 1 [pep8/E302] [5] ERROR: Tools/Scripts/webkitpy/common/asan/utils.py:36: whitespace before '}' [pep8/E202] [5] ERROR: Tools/Scripts/webkitpy/common/asan/__init__.py:1: no newline at end of file [pep8/W292] [5] Total errors found: 3 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Dana Burkart
Comment 9
2015-03-18 16:37:49 PDT
Created
attachment 248984
[details]
Fix style
Alexey Proskuryakov
Comment 10
2015-03-18 16:39:46 PDT
Comment on
attachment 248981
[details]
Set ASAN_OPTIONS in run-webkit-tests View in context:
https://bugs.webkit.org/attachment.cgi?id=248981&action=review
> Tools/Scripts/webkitpy/common/asan/__init__.py:2 > \ No newline at end of file
Should one be added?
> Tools/Scripts/webkitpy/common/asan/utils.py:13 > +# * Neither the name of Google Inc. nor the names of its
Is this the right license? The preferred WebKit license text is at <
http://www.webkit.org/coding/bsd-license.html
>.
> Tools/Scripts/webkitpy/common/asan/utils.py:34 > + "abort_on_error" : 1,
I don't think that we want this.
> Tools/Scripts/webkitpy/common/asan/utils.py:36 > + "handle_segv" : 0
Not sure about this, it should probably be in a separate fix if it's needed at all.
> Tools/Scripts/webkitpy/port/driver.py:320 > + if ASanUtility.compiled_with_asan(self._port._path_to_driver()):
I just thought... We do we care, can we just always set the environment variable?
Dana Burkart
Comment 11
2015-03-18 16:39:51 PDT
Created
attachment 248986
[details]
Really fix style....
WebKit Commit Bot
Comment 12
2015-03-18 16:42:16 PDT
Attachment 248986
[details]
did not pass style-queue: ERROR: Tools/Scripts/webkitpy/common/asan/utils.py:36: whitespace before '}' [pep8/E202] [5] ERROR: Tools/Scripts/webkitpy/common/asan/utils.py:50: blank line at end of file [pep8/W391] [5] Total errors found: 2 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alexey Proskuryakov
Comment 13
2015-03-18 16:42:42 PDT
Comment on
attachment 248986
[details]
Really fix style.... View in context:
https://bugs.webkit.org/attachment.cgi?id=248986&action=review
> Tools/Scripts/webkitpy/port/driver.py:320 > + if ASanUtility.compiled_with_asan(self._port._path_to_driver()):
In addition to the above comments: this looks like code that is shared across all platforms, and we probably cannot run otool everywhere.
Dana Burkart
Comment 14
2015-03-18 16:45:14 PDT
(In reply to
comment #10
)
> Comment on
attachment 248981
[details]
> Set ASAN_OPTIONS in run-webkit-tests > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=248981&action=review
> > > Tools/Scripts/webkitpy/common/asan/__init__.py:2 > > \ No newline at end of file > > Should one be added? > > > Tools/Scripts/webkitpy/common/asan/utils.py:13 > > +# * Neither the name of Google Inc. nor the names of its > > Is this the right license? > > The preferred WebKit license text is at > <
http://www.webkit.org/coding/bsd-license.html
>. > > > Tools/Scripts/webkitpy/common/asan/utils.py:34 > > + "abort_on_error" : 1, > > I don't think that we want this. > > > Tools/Scripts/webkitpy/common/asan/utils.py:36 > > + "handle_segv" : 0 > > Not sure about this, it should probably be in a separate fix if it's needed > at all. >
I added "abort_on_error" and "handle_segv", as David Kilzer had added them to his patch. If we don't need them I will take them out.
> > Tools/Scripts/webkitpy/port/driver.py:320 > > + if ASanUtility.compiled_with_asan(self._port._path_to_driver()): > > I just thought... We do we care, can we just always set the environment > variable?
I guess we don't care. I'll remove it.
Dana Burkart
Comment 15
2015-03-18 16:50:18 PDT
Created
attachment 248987
[details]
Address Alexey's concerns
Alexey Proskuryakov
Comment 16
2015-03-18 16:52:09 PDT
Comment on
attachment 248987
[details]
Address Alexey's concerns View in context:
https://bugs.webkit.org/attachment.cgi?id=248987&action=review
> Tools/Scripts/webkitpy/port/driver.py:320 > + environment['ASAN_OPTIONS'] = ASanUtility.environment_options()
At this point, I think that it would be better to just say environment['ASAN_OPTIONS'] = "allocator_may_return_null=1"
WebKit Commit Bot
Comment 17
2015-03-18 16:53:35 PDT
Attachment 248987
[details]
did not pass style-queue: ERROR: Tools/Scripts/webkitpy/common/asan/utils.py:25: whitespace before '}' [pep8/E202] [5] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Dana Burkart
Comment 18
2015-03-18 16:56:36 PDT
(In reply to
comment #16
)
> Comment on
attachment 248987
[details]
> Address Alexey's concerns > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=248987&action=review
> > > Tools/Scripts/webkitpy/port/driver.py:320 > > + environment['ASAN_OPTIONS'] = ASanUtility.environment_options() > > At this point, I think that it would be better to just say > > environment['ASAN_OPTIONS'] = "allocator_may_return_null=1"
I agree, but I think that is going to get clunky soon, as I am sure we will be setting more environment variables soon.
Dana Burkart
Comment 19
2015-03-18 17:02:27 PDT
Merged
r181714
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug