New issue
Advanced search Search tips

Issue 706476 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android
Pri: 3
Type: Bug

Blocking:
issue 507717



Sign in to add a comment

tcmalloc shifts negative values around, which is undefined behavior

Project Member Reported by thestig@chromium.org, Mar 29 2017

Issue description

Remove the Wnoshift-negative-value compiler flag and rebuild:

../../third_party/tcmalloc/chromium/src/base/basictypes.h:85:51: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
const  int64 kint64min =  ( ((( int64) kint32min) << 32) | 0 );
                             ~~~~~~~~~~~~~~~~~~~~ ^
1 error generated.
 
Owner: thakis@chromium.org
Status: Started (was: Available)
https://codereview.chromium.org/2793793002/
Status: Fixed (was: Started)
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/57ff2187bc8cae39753837100bc96b92a230eb3d

commit 57ff2187bc8cae39753837100bc96b92a230eb3d
Author: Mao Huang <littlecvr@chromium.org>
Date: Tue Oct 09 17:25:22 2018

tcmalloc: tiny commits gathered

These are tiny commits that can be reviewed together.

Original CLs:

- https://codereview.chromium.org/550011

  Increase the size of buffer used by LogPrintf to 1600 bytes.
  600 bytes is not enough to print full symbolized stacks of the memory
  leaks.

  TBR=willchan

- https://codereview.chromium.org/257453002

  Fix tc_malloc_skip_new_handler to work together with heap profiler

  Need to be in google_malloc section just like every other alloc
  function.

  R=willchan@chromium.org

  BUG= 364380 

- https://codereview.chromium.org/2793793002

  Fix -Wshift-negative-value transgression in tcmalloc.

  BUG= 706476 

BUG=724399,b:70905156

Change-Id: I842770683233808c3a84d1bf3557db6f8e5e6f99
Reviewed-on: https://chromium-review.googlesource.com/c/1130810
Reviewed-by: Will Harris <wfh@chromium.org>
Commit-Queue: Gabriel Marin <gmx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597974}
[modify] https://crrev.com/57ff2187bc8cae39753837100bc96b92a230eb3d/third_party/tcmalloc/chromium/src/base/basictypes.h
[modify] https://crrev.com/57ff2187bc8cae39753837100bc96b92a230eb3d/third_party/tcmalloc/chromium/src/base/logging.h
[modify] https://crrev.com/57ff2187bc8cae39753837100bc96b92a230eb3d/third_party/tcmalloc/chromium/src/tcmalloc.cc

Sign in to add a comment