Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Issue 2145213002: Subzero: implemented wrapper script to replace calls to calloc() (Closed)

Created:
4 years, 5 months ago by tlively
Modified:
4 years, 5 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

implemented wrapper script to replace calls to calloc() BUG=https://bugs.chromium.org/p/nativeclient/issues/detail?id=4374 R=kschimpf@google.com, stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=f0f80654e8bafb18d795c3c77f590ee885ea753a

Patch Set 1 #

Patch Set 2 : Updated command examples #

Total comments: 4

Patch Set 3 : Addressed comments and added error testing #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -5 lines) Patch
M docs/ASAN.rst View 1 2 1 chunk +12 lines, -5 lines 2 comments Download
A pydir/sz-clang.py View 1 2 1 chunk +6 lines, -0 lines 2 comments Download
A pydir/sz-clang++.py View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
A pydir/sz_clang_dummies.c View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
A pydir/sz_driver.py View 1 2 1 chunk +88 lines, -0 lines 4 comments Download
A tests_lit/asan_tests/Input/calloc.c View 1 chunk +10 lines, -0 lines 0 comments Download
A tests_lit/asan_tests/Input/calloc_err.c View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A tests_lit/asan_tests/calloc.ll View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
A tests_lit/asan_tests/calloc_err.ll View 1 2 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (3 generated)
tlively
4 years, 5 months ago (2016-07-13 22:04:57 UTC) #2
Karl
https://codereview.chromium.org/2145213002/diff/20001/docs/ASAN.rst File docs/ASAN.rst (right): https://codereview.chromium.org/2145213002/diff/20001/docs/ASAN.rst#newcode18 docs/ASAN.rst:18: Furthermore, pnacl-clang automatically inlines calls to calloc(), even with ...
4 years, 5 months ago (2016-07-14 17:33:51 UTC) #3
tlively
https://codereview.chromium.org/2145213002/diff/20001/docs/ASAN.rst File docs/ASAN.rst (right): https://codereview.chromium.org/2145213002/diff/20001/docs/ASAN.rst#newcode18 docs/ASAN.rst:18: Furthermore, pnacl-clang automatically inlines calls to calloc(), even with ...
4 years, 5 months ago (2016-07-14 20:26:14 UTC) #4
Karl
lgtm https://codereview.chromium.org/2145213002/diff/40001/docs/ASAN.rst File docs/ASAN.rst (right): https://codereview.chromium.org/2145213002/diff/40001/docs/ASAN.rst#newcode27 docs/ASAN.rst:27: sz-clang.py -fno-inline -fsanitize-address -o hello.nonfinal.pexe hello.c Silly question: ...
4 years, 5 months ago (2016-07-14 20:36:29 UTC) #6
Jim Stichnoth
otherwise lgtm https://codereview.chromium.org/2145213002/diff/40001/pydir/sz-clang.py File pydir/sz-clang.py (right): https://codereview.chromium.org/2145213002/diff/40001/pydir/sz-clang.py#newcode6 pydir/sz-clang.py:6: sz_driver.run(False) I don't know if this is ...
4 years, 5 months ago (2016-07-14 20:42:11 UTC) #7
tlively
Committed patchset #3 (id:40001) manually as f0f80654e8bafb18d795c3c77f590ee885ea753a (presubmit successful).
4 years, 5 months ago (2016-07-14 21:30:04 UTC) #9
tlively
4 years, 5 months ago (2016-07-15 01:54:25 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/2145213002/diff/40001/docs/ASAN.rst
File docs/ASAN.rst (right):

https://codereview.chromium.org/2145213002/diff/40001/docs/ASAN.rst#newcode27
docs/ASAN.rst:27: sz-clang.py -fno-inline -fsanitize-address -o
hello.nonfinal.pexe hello.c
On 2016/07/14 20:36:29, Karl wrote:
> Silly question: Should you add -fno-inline if -fsanitize-address is specified.
> 
> If both are necessary, the script should add it automatically.

Done.

https://codereview.chromium.org/2145213002/diff/40001/pydir/sz-clang.py
File pydir/sz-clang.py (right):

https://codereview.chromium.org/2145213002/diff/40001/pydir/sz-clang.py#newcode6
pydir/sz-clang.py:6: sz_driver.run(False)
On 2016/07/14 20:42:11, stichnot wrote:
> I don't know if this is valid or reasonable python, but if you call something
> like this:
>   sz_driver.run(is_cpp=False)
> then it become more self-documenting.

Done.

https://codereview.chromium.org/2145213002/diff/40001/pydir/sz_driver.py
File pydir/sz_driver.py (right):

https://codereview.chromium.org/2145213002/diff/40001/pydir/sz_driver.py#newc...
pydir/sz_driver.py:10: macros = (
On 2016/07/14 20:42:11, stichnot wrote:
>
https://www.chromium.org/chromium-os/python-style-guidelines#TOC-Official-Sty...
> 
> says use an indent of 2 spaces, not 4.
> 
> Subzero has some "legacy" scripts that use 4 spaces, but for new files, it
would
> be nice to use 2.

Decided against this change to maintain consistency within directory.

https://codereview.chromium.org/2145213002/diff/40001/pydir/sz_driver.py#newc...
pydir/sz_driver.py:11: '#include <stddef.h>\n'
On 2016/07/14 20:42:11, stichnot wrote:
> It would be nice if you could remove all the '\n' and then maybe add them
back,
> in one shot, before "return macros".

Done.

Powered by Google App Engine
This is Rietveld 408576698