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

Issue 10384117: Add a chromium version abort function for tcmalloc: Abort(). (Closed)

Created:
8 years, 7 months ago by kaiwang
Modified:
8 years, 7 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Add a chromium version abort function for tcmalloc: Abort(). This is because on some platform (e.g. Windows), the way to implement abort() is different so chrome's crash service can not detect the crash but treat as normal exit. See http://code.google.com/p/chromium/issues/detail?id=118665 for some detail. In this implementation, a segment fault will be triggered and this will be treated as crash on all platforms. BUG=127724 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=137013

Patch Set 1 #

Total comments: 13

Patch Set 2 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -22 lines) Patch
A third_party/tcmalloc/chromium/src/base/abort.h View 1 1 chunk +34 lines, -0 lines 3 comments Download
M third_party/tcmalloc/chromium/src/base/atomicops-internals-arm-generic.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/tcmalloc/chromium/src/base/atomicops-internals-arm-v6plus.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M third_party/tcmalloc/chromium/src/base/atomicops-internals-windows.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M third_party/tcmalloc/chromium/src/base/logging.h View 1 6 chunks +9 lines, -6 lines 0 comments Download
M third_party/tcmalloc/chromium/src/base/simple_mutex.h View 1 3 chunks +7 lines, -7 lines 0 comments Download
M third_party/tcmalloc/chromium/src/debugallocation.cc View 1 2 chunks +2 lines, -1 line 0 comments Download
M third_party/tcmalloc/chromium/src/heap-checker-bcad.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/tcmalloc/chromium/src/internal_logging.cc View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/tcmalloc/chromium/src/memfs_malloc.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (0 generated)
kaiwang
8 years, 7 months ago (2012-05-11 03:49:18 UTC) #1
eroman
LGTM http://codereview.chromium.org/10384117/diff/1/third_party/tcmalloc/chromium/src/base/abort.h File third_party/tcmalloc/chromium/src/base/abort.h (right): http://codereview.chromium.org/10384117/diff/1/third_party/tcmalloc/chromium/src/base/abort.h#newcode45 third_party/tcmalloc/chromium/src/base/abort.h:45: inline void Abort() { I think this should ...
8 years, 7 months ago (2012-05-11 03:55:53 UTC) #2
kaiwang
http://codereview.chromium.org/10384117/diff/1/third_party/tcmalloc/chromium/src/base/abort.h File third_party/tcmalloc/chromium/src/base/abort.h (right): http://codereview.chromium.org/10384117/diff/1/third_party/tcmalloc/chromium/src/base/abort.h#newcode45 third_party/tcmalloc/chromium/src/base/abort.h:45: inline void Abort() { Actually most content in base ...
8 years, 7 months ago (2012-05-11 20:54:59 UTC) #3
eroman
http://codereview.chromium.org/10384117/diff/1/third_party/tcmalloc/chromium/src/base/abort.h File third_party/tcmalloc/chromium/src/base/abort.h (right): http://codereview.chromium.org/10384117/diff/1/third_party/tcmalloc/chromium/src/base/abort.h#newcode45 third_party/tcmalloc/chromium/src/base/abort.h:45: inline void Abort() { On 2012/05/11 20:54:59, kaiwang wrote: ...
8 years, 7 months ago (2012-05-11 21:11:14 UTC) #4
jar (doing other things)
I'm very psyched to see what this reveals when landed!! A few comments below. http://codereview.chromium.org/10384117/diff/1/third_party/tcmalloc/chromium/src/base/abort.h ...
8 years, 7 months ago (2012-05-11 21:57:56 UTC) #5
jar (doing other things)
https://chromiumcodereview.appspot.com/10384117/diff/1/third_party/tcmalloc/chromium/src/base/abort.h File third_party/tcmalloc/chromium/src/base/abort.h (right): https://chromiumcodereview.appspot.com/10384117/diff/1/third_party/tcmalloc/chromium/src/base/abort.h#newcode42 third_party/tcmalloc/chromium/src/base/abort.h:42: #ifdef TCMALLOC_USE_SYSTEM_ABORT <doh>. As per conversation, this is over ...
8 years, 7 months ago (2012-05-11 22:46:35 UTC) #6
kaiwang
Uploaded a new version http://codereview.chromium.org/10384117/diff/1/third_party/tcmalloc/chromium/src/base/abort.h File third_party/tcmalloc/chromium/src/base/abort.h (right): http://codereview.chromium.org/10384117/diff/1/third_party/tcmalloc/chromium/src/base/abort.h#newcode31 third_party/tcmalloc/chromium/src/base/abort.h:31: // Author: Kai Wang <opensource@google.com> ...
8 years, 7 months ago (2012-05-12 00:06:09 UTC) #7
jar (doing other things)
lgtm
8 years, 7 months ago (2012-05-12 14:53:50 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kaiwang@chromium.org/10384117/5005
8 years, 7 months ago (2012-05-14 21:26:46 UTC) #9
commit-bot: I haz the power
Change committed as 137013
8 years, 7 months ago (2012-05-14 23:43:58 UTC) #10
hans
https://chromiumcodereview.appspot.com/10384117/diff/5005/third_party/tcmalloc/chromium/src/base/abort.h File third_party/tcmalloc/chromium/src/base/abort.h (right): https://chromiumcodereview.appspot.com/10384117/diff/5005/third_party/tcmalloc/chromium/src/base/abort.h#newcode28 third_party/tcmalloc/chromium/src/base/abort.h:28: *reinterpret_cast<int*>(NULL) = 0x2001; This causes a Clang warning: abort.h:28:3: ...
8 years, 7 months ago (2012-05-15 11:38:06 UTC) #11
kaiwang
https://chromiumcodereview.appspot.com/10384117/diff/5005/third_party/tcmalloc/chromium/src/base/abort.h File third_party/tcmalloc/chromium/src/base/abort.h (right): https://chromiumcodereview.appspot.com/10384117/diff/5005/third_party/tcmalloc/chromium/src/base/abort.h#newcode28 third_party/tcmalloc/chromium/src/base/abort.h:28: *reinterpret_cast<int*>(NULL) = 0x2001; Sure, I'll fix. Sorry for the ...
8 years, 7 months ago (2012-05-15 17:56:03 UTC) #12
kaiwang
https://chromiumcodereview.appspot.com/10384117/diff/5005/third_party/tcmalloc/chromium/src/base/abort.h File third_party/tcmalloc/chromium/src/base/abort.h (right): https://chromiumcodereview.appspot.com/10384117/diff/5005/third_party/tcmalloc/chromium/src/base/abort.h#newcode28 third_party/tcmalloc/chromium/src/base/abort.h:28: *reinterpret_cast<int*>(NULL) = 0x2001; Just curious, I don't see this ...
8 years, 7 months ago (2012-05-15 18:04:51 UTC) #13
hans
8 years, 7 months ago (2012-05-16 09:02:33 UTC) #14
On 2012/05/15 18:04:51, kaiwang wrote:
>
https://chromiumcodereview.appspot.com/10384117/diff/5005/third_party/tcmallo...
> File third_party/tcmalloc/chromium/src/base/abort.h (right):
> 
>
https://chromiumcodereview.appspot.com/10384117/diff/5005/third_party/tcmallo...
> third_party/tcmalloc/chromium/src/base/abort.h:28:
*reinterpret_cast<int*>(NULL)
> = 0x2001;
> Just curious, I don't see this warning while compiling. So it's by default
> turned off? Then is the optimizing by default on?

Are you using Clang? GCC doesn't have this warning.

I saw this when building Chrome on Linux with Clang as decribed on
http://code.google.com/p/chromium/wiki/Clang

Powered by Google App Engine
This is Rietveld 408576698