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

Issue 2720703004: allocator: Fix function type mismatch in allocator function definitions. (Closed)

Created:
3 years, 9 months ago by pcc1
Modified:
3 years, 9 months ago
CC:
chromium-reviews, wfh+watch_chromium.org, Dai Mikurube (NOT FULLTIME), vmpstr+watch_chromium.org, erikchen
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

allocator: Fix function type mismatch in allocator function definitions. CL 2697123007 added a context argument to most of the shim allocator functions. This means that it is no longer valid to define (say) malloc as an alias of ShimMalloc, because their function types no longer match. This change defines the allocator functions as real functions that call the shims passing nullptr as the context. Found with -fsanitize=cfi-icall. R=primiano@chromium.org BUG=696986, 601497 Review-Url: https://codereview.chromium.org/2720703004 Cr-Commit-Position: refs/heads/master@{#453900} Committed: https://chromium.googlesource.com/chromium/src/+/d4809ef025d50acb50489134273e13444252a8e6

Patch Set 1 #

Total comments: 2

Patch Set 2 : Change shim functions to be ALWAYS_INLINE and replace all aliases with calls #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -98 lines) Patch
M base/allocator/allocator_shim.cc View 1 10 chunks +22 lines, -20 lines 0 comments Download
M base/allocator/allocator_shim_internals.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M base/allocator/allocator_shim_override_cpp_symbols.h View 1 1 chunk +27 lines, -18 lines 0 comments Download
M base/allocator/allocator_shim_override_glibc_weak_symbols.h View 1 1 chunk +27 lines, -16 lines 0 comments Download
M base/allocator/allocator_shim_override_libc_symbols.h View 1 2 chunks +28 lines, -19 lines 0 comments Download
M base/allocator/allocator_shim_override_linker_wrapped_symbols.h View 1 1 chunk +33 lines, -23 lines 0 comments Download

Messages

Total messages: 15 (8 generated)
pcc1
3 years, 9 months ago (2017-02-28 02:12:21 UTC) #1
Primiano Tucci (use gerrit)
OMG I am extremely grateful that you spotted this Peter! This was extremely subtle. Bless ...
3 years, 9 months ago (2017-02-28 12:18:49 UTC) #2
pcc1
> OMG I am extremely grateful that you spotted this Peter! This was extremely > ...
3 years, 9 months ago (2017-02-28 20:12:42 UTC) #3
pcc1
https://codereview.chromium.org/2720703004/diff/1/base/allocator/allocator_shim_override_glibc_weak_symbols.h File base/allocator/allocator_shim_override_glibc_weak_symbols.h (right): https://codereview.chromium.org/2720703004/diff/1/base/allocator/allocator_shim_override_glibc_weak_symbols.h#newcode79 base/allocator/allocator_shim_override_glibc_weak_symbols.h:79: SHIM_ALWAYS_EXPORT void* __libc_malloc(size_t size) SHIM_ALIAS_SYMBOL(malloc); Done, as discussed on ...
3 years, 9 months ago (2017-02-28 22:27:35 UTC) #4
Primiano Tucci (use gerrit)
awesome, LGTM. I checked the two red bots and the failures seem completely unrelated (a ...
3 years, 9 months ago (2017-03-01 10:10:27 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2720703004/20001
3 years, 9 months ago (2017-03-01 10:11:27 UTC) #12
commit-bot: I haz the power
3 years, 9 months ago (2017-03-01 11:02:38 UTC) #15
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/d4809ef025d50acb50489134273e...

Powered by Google App Engine
This is Rietveld 408576698