[llvm] r284437 - Rename HexStyle -> HexFormatStyle, and remove a constexpr.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 18 16:05:54 PDT 2016


If this doesn't turn anything up, we can add some print statements to
NativeFormatTest.cpp since debugging doesn't work well in an optimized
build.

For example, make a global variable in NativeFormatTest.cpp called g_print,
initialize it to false, in write_signed when N == -10, set it to true, and
when it's true you write a bunch of logging to stderr to trace the value
through the various functions.

On Tue, Oct 18, 2016 at 3:50 PM Zachary Turner <zturner at google.com> wrote:

> To get it to run under ubsan, I did the following.
>
> 1. clone compiler-rt into llvm/projects.
> 2. Build a stage 1 clang into A using -DCMAKE_BUILD_TYPE=Release
> 3. Build a stage 2 clang into B using -DCMAKE_BUILD_TYPE=Release
> -DCMAKE_C_COMPILER=A/bin/clang -DCMAKE_CXX_COMPILER=/A/bin/clang++
> -DLLVM_USE_SANITIZER=Undefined
> 4. ninja SupportTests
> 5. unittests/Support/SupportTests --gtest_filter=NativeFormatTest.*
>
> On Tue, Oct 18, 2016 at 3:46 PM Zachary Turner <zturner at google.com> wrote:
>
> I'm leaning towards bug in clang's optimizer.  I've scanned this code
> multiple times and I really don't see any UB.  I ran it under ubsan on
> Linux and it did not report any problems.
>
> I guess maybe you could run it under ubsan on aarch64 as well?
>
> Assuming that passes, where do we go from here?  I know 0 about the
> optimizer or how to fix a bug in it, especially one that only occurs in a
> backend I have no access to :-/
>
> On Tue, Oct 18, 2016 at 2:40 AM Renato Golin <renato.golin at linaro.org>
> wrote:
>
> On 18 October 2016 at 00:08, Zachary Turner via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: zturner
> > Date: Mon Oct 17 18:08:47 2016
> > New Revision: 284437
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=284437&view=rev
> > Log:
> > Rename HexStyle -> HexFormatStyle, and remove a constexpr.
> >
> > This should fix the remaining broken builds.
>
> Hi Zach,
>
> Didn't quite fix all problems, but we're getting there... :)
>
> http://lab.llvm.org:8011/builders/clang-cmake-aarch64-full/builds/3344
>
> [ RUN      ] NativeFormatTest.IntegerTests
>
> /home/buildslave/buildslave/clang-cmake-aarch64-full/llvm/unittests/Support/NativeFormatTests.cpp:249:
> Failure
> Value of: format_number(-10, IntegerStyle::Integer, 1)
>   Actual: "-0"
> Expected: "-10"
> [  FAILED  ] NativeFormatTest.IntegerTests (0 ms)
>
> I have reverted on r284462. Let me know if you need help testing.
>
> cheers,
> --renato
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161018/3eb8a5d1/attachment.html>


More information about the llvm-commits mailing list