[compiler-rt] 041547e - scudo: Table driven size classes for Android allocator.

Mikael Holmén via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 22:48:04 PST 2020


On Tue, 2020-02-11 at 08:40 -0800, Peter Collingbourne wrote:
> On Tue, Feb 11, 2020 at 8:22 AM Teresa Johnson <tejohnson at google.com>
> wrote:
> > 
> > On Mon, Feb 10, 2020 at 11:59 PM Mikael Holmén via llvm-commits <
> > llvm-commits at lists.llvm.org> wrote:
> > > Hi Peter,
> > > 
> > > I get two warnings with this commit when compiling with clang
> > > 8.0:
> > > 
> > > /repo/uabelho/master/compiler-
> > > rt/lib/scudo/standalone/size_class_map.h:122:20: error: implicit
> > > conversion loses integer precision: 'unsigned long' to
> > > 'scudo::u8' (aka
> > > 'unsigned char') [-Werror,-Wimplicit-int-conversion]
> > >           return i + 1;
> > >           ~~~~~~ ~~^~~
> > > /repo/uabelho/master/compiler-
> > > rt/lib/scudo/standalone/size_class_map.h:124:14: error: implicit
> > > conversion changes signedness: 'int' to 'scudo::u8' (aka
> > > 'unsigned
> > > char') [-Werror,-Wsign-conversion]
> > >       return -1;
> > >       ~~~~~~ ^~
> > > 2 errors generated.
> > 
> > I get these as well, and when I work around them by adding casts I
> > get an additional failure:
> > 
> > compiler-rt/lib/scudo/standalone/size_class_map.h:27:21: error: use
> > of undeclared identifier 'MaxSize'
> >     DCHECK_LE(Size, MaxSize);
> > 
> 
> These should all be fixed by 515e19ae7b5.

Thanks!

/Mikael

> 
> Peter


More information about the llvm-commits mailing list