[llvm-bugs] [Bug 41565] New: wasm linker: __start_SECTION / __end_SECTION symbol missing

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41565

Bug ID: 41565
   Summary: wasm linker: __start_SECTION / __end_SECTION symbol
missing
   Product: lld
   Version: unspecified
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: All Bugs
  Assignee: unassignedb...@nondot.org
  Reporter: c...@remobjects.com
CC: llvm-bugs@lists.llvm.org, peter.sm...@linaro.org

When having a symbol like:

@_typeinfo__rtti_te_Module6_d_Test = private constant i8* bitcast
(@_rtti_te_Module6_d_Test to i8*), section "ELRTTLRR", align 4


there is no way to get the start/end of the ELRTTLRR section in wasm currently.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41564] New: Clang is broken when the LLVM suite is built all-in-one via LLVM, but works when built separately

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41564

Bug ID: 41564
   Summary: Clang is broken when the LLVM suite is built
all-in-one via LLVM, but works when built separately
   Product: new-bugs
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: kyle.de...@mykolab.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

With https://aur.archlinux.org/packages/llvm-git, Clang is built by moving the
`clang` directory to `llvm/tools/clang`, as shown by this line:
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=llvm-git#n67

Clang is then built via `cmake "$srcdir"/llvm-project/llvm`. This results in a
broken `clang` binary

However, Clang has been noted to work when LLVM and Clang are built separately,
with LLVM being built first, CompilerRT second, and lastly, Clang.

Therefore, there's a weird bug somewhere where the all-in-one Clang build just
breaks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41204] 8.0 regression: Search to crt*.o fails on mips64el

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41204

Tom Stellard  changed:

   What|Removed |Added

 Fixed By Commit(s)|r357506 |r357506 r358947
 Status|CONFIRMED   |RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Tom Stellard  ---
Merged: r358947

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41221] [meta] 8.0.1 Release Blockers

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41221
Bug 41221 depends on bug 41204, which changed state.

Bug 41204 Summary: 8.0 regression: Search to crt*.o fails on mips64el
https://bugs.llvm.org/show_bug.cgi?id=41204

   What|Removed |Added

 Status|CONFIRMED   |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41435] Merge r356039 into the 8.0 branch : [MIPS][microMIPS] Fix PseudoMTLOHI_MM matching and expansion

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41435

Tom Stellard  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Fixed By Commit(s)|r356039 |r356039 r358941
 Resolution|--- |FIXED

--- Comment #1 from Tom Stellard  ---
Merged: r358941

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41221] [meta] 8.0.1 Release Blockers

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41221
Bug 41221 depends on bug 41435, which changed state.

Bug 41435 Summary: Merge r356039 into the 8.0 branch : [MIPS][microMIPS] Fix 
PseudoMTLOHI_MM matching and expansion
https://bugs.llvm.org/show_bug.cgi?id=41435

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41563] New: operator<<(ostream, string) declared in but defined in

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41563

Bug ID: 41563
   Summary: operator<<(ostream, string) declared in  but
defined in 
   Product: libc++
   Version: unspecified
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: All Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: smee...@fb.com
CC: e...@efcs.ca, ldio...@apple.com,
llvm-bugs@lists.llvm.org, mclow.li...@gmail.com

$ cat f.cpp
#include 
#include 
void f(std::ostream ) { os << std::string("Hello world!\n"); }

$ cat main.cpp
#include 
#include 
void f(std::ostream &);
int main() { f(std::cout); }

$ clang++ f.cpp main.cpp
Undefined symbols for architecture x86_64:
  "std::__1::basic_ostream >&
std::__1::operator<<,
std::__1::allocator >(std::__1::basic_ostream >&, std::__1::basic_string, std::__1::allocator > const&)", referenced
from:
  f(std::__1::basic_ostream >&) in
f-e729ff.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The operator<<(ostream, string) overload is declared in  but defined in
, so if you just include , you end up with an undefined
reference to it which results in a link error, as demonstrated above. It links
successfully if I change f.cpp to include  instead of .

I don't know if this would necessarily be considered a bug, but I find it
strange that you can end up in a situation where you include a header and have
all the declarations needed to compile, but then have to pull in another header
to actually be able to link.

My above test case was run with Xcode 10.2, but in theory you should have the
same issue with upstream libc++.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41562] New: Loop optimizer aggressively unrolling and vectorizing loops despite small bound on trip count

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41562

Bug ID: 41562
   Summary: Loop optimizer aggressively unrolling and vectorizing
loops despite small bound on trip count
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Loop Optimizer
  Assignee: unassignedb...@nondot.org
  Reporter: fabi...@radgametools.com
CC: llvm-bugs@lists.llvm.org

Here's a fairly straightforward adaptation of real-world code we noticed this
in. This is essentially undoing byte-wise delta coding.

-

#include 
#include 
#include 

void f(uint8_t *dest, const uint8_t *src, ptrdiff_t offs, size_t len)
{
// note: len is always < 64 for this func
// offset is allowed to be -8 (but not >=-7) so can't do more than 8 at
once
while (len >= 8)
{
__m128i v0 = _mm_loadl_epi64((const __m128i *) src);
__m128i v1 = _mm_loadl_epi64((const __m128i *) (dest + offs));
__m128i sum = _mm_add_epi8(v0, v1);
_mm_storel_epi64((__m128i *) dest, sum);
src += 8;
dest += 8;
len -= 8;
}

// this loop gets extensively unrolled and vectorized
// which produces tons of code and is entirely pointless since
// len < 7 here.
while (len--)
{
*dest = *src++ + dest[offs];
dest++;
}
}

-

https://godbolt.org/z/yZ4WHw

There are other paths that handle long lengths but they are not relevant here.

Current trunk produces a ton of code for this loop; this has been the case for
several major releases at least.

The final loop (starting in line 23) is strictly dominated by the loop above
it; therefore, !(len >= 8) == len < 8 should be inferrable. Extensive unrolling
or loop vectorization is pointless in this instance.

This is a simple example but we've run into numerous instances of this:
essentially, an optimized (and manually vectorized) loop that has a small tail
portion. Trying to vectorize these tail loops does not improve perf and causes
noticeable code bloat.

It's possible to work around this using manual loop optimizer pragmas but this
is rather noisy in the source code, especially in code bases that also need to
work with other compilers (and thus require #ifdefs around Clang-specific
pragmas).

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41221] [meta] 8.0.1 Release Blockers

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41221
Bug 41221 depends on bug 41434, which changed state.

Bug 41434 Summary: Merge r355825 into the 8.0 branch : [MIPS][microMIPS] Add a 
pattern to match TruncIntFP
https://bugs.llvm.org/show_bug.cgi?id=41434

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41434] Merge r355825 into the 8.0 branch : [MIPS][microMIPS] Add a pattern to match TruncIntFP

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41434

Tom Stellard  changed:

   What|Removed |Added

 Fixed By Commit(s)|r355825 |r355825 r358936
 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Tom Stellard  ---
Merged: r358936

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41375] Merge r354882 into the 8.0 branch : [mips] Emit `.module softfloat` directive

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41375

Tom Stellard  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Fixed By Commit(s)|r354882 |r354882 r358934
 Resolution|--- |FIXED

--- Comment #2 from Tom Stellard  ---
Merged: r358934

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41221] [meta] 8.0.1 Release Blockers

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41221
Bug 41221 depends on bug 41375, which changed state.

Bug 41375 Summary: Merge r354882 into the 8.0 branch : [mips] Emit `.module 
softfloat` directive
https://bugs.llvm.org/show_bug.cgi?id=41375

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41374] Merge r354808 into the 8.0 branch : [Mips] Fix missing masking in fast-isel of br (PR40325)

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41374

Tom Stellard  changed:

   What|Removed |Added

 Fixed By Commit(s)|r354808 |r354808 r358925
 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #2 from Tom Stellard  ---
Merged: r358925

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41221] [meta] 8.0.1 Release Blockers

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41221
Bug 41221 depends on bug 41374, which changed state.

Bug 41374 Summary: Merge r354808 into the 8.0 branch : [Mips] Fix missing 
masking in fast-isel of br (PR40325)
https://bugs.llvm.org/show_bug.cgi?id=41374

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41221] [meta] 8.0.1 Release Blockers

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41221
Bug 41221 depends on bug 41099, which changed state.

Bug 41099 Summary: Segfault from clang when compiling OpenMP doacross loop
https://bugs.llvm.org/show_bug.cgi?id=41099

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41099] Segfault from clang when compiling OpenMP doacross loop

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41099

Tom Stellard  changed:

   What|Removed |Added

 Fixed By Commit(s)|r356198 |r356198 r358923
 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #10 from Tom Stellard  ---
Merged: r358923

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41561] New: decltype(&(C::member)) yields pointer-to-member type

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41561

Bug ID: 41561
   Summary: decltype(&(C::member)) yields pointer-to-member type
   Product: clang
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: csm...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk

In some contexts, decltype(&(C::member)) yields a pointer to member type, but
according to [expr.unary.op]/4, no pointer to member should be formed when the
operand of the & operator is enclosed in parentheses.

http://eel.is/c++draft/expr.unary.op#4

The code below demonstrates this behavior. It compiles on all Clang versions I
have tried between 3.2 and HEAD, even though I don't think it should.

```
#include 

struct S {
int x;

static_assert(std::is_same::value, ""); // !

void foo() {
static_assert(std::is_same::value, ""); // OK
}
};

static_assert(std::is_same::value, ""); // !

int main() {
}
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41547] wrong cod with "opt -instcombine -deadarghaX0r"

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41547

Eli Friedman  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||efrie...@quicinc.com
 Resolution|--- |INVALID

--- Comment #2 from Eli Friedman  ---
deadarghaX0r is not an optimization pass; it intentionally breaks the semantics
of the code.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41373] Merge r354672 into the 8.0 branch : [mips][micromips] fix filling delay slots for PseudoIndirectBranch_MM

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41373

Tom Stellard  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Fixed By Commit(s)|r354672 |r354672 r358920
 Status|NEW |RESOLVED

--- Comment #2 from Tom Stellard  ---
Merged: r358920

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41221] [meta] 8.0.1 Release Blockers

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41221
Bug 41221 depends on bug 41373, which changed state.

Bug 41373 Summary: Merge r354672 into the 8.0 branch : [mips][micromips] fix 
filling delay slots for PseudoIndirectBranch_MM
https://bugs.llvm.org/show_bug.cgi?id=41373

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41221] [meta] 8.0.1 Release Blockers

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41221
Bug 41221 depends on bug 41235, which changed state.

Bug 41235 Summary: Merge r355854 to the release_80 branch
https://bugs.llvm.org/show_bug.cgi?id=41235

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41235] Merge r355854 to the release_80 branch

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41235

Tom Stellard  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Fixed By Commit(s)|r355854 |r355854 r
 Resolution|--- |FIXED

--- Comment #2 from Tom Stellard  ---
Merged: r

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 40503] wasm-ld: warning: unexpected existing value for R_WEBASSEMBLY_FUNCTION_OFFSET_I32

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40503

Sam Clegg  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41560] New: Assertion `!Init->isValueDependent()' with c++17 deduction guides

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41560

Bug ID: 41560
   Summary: Assertion `!Init->isValueDependent()' with c++17
deduction guides
   Product: clang
   Version: trunk
  Hardware: PC
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: Frontend
  Assignee: unassignedclangb...@nondot.org
  Reporter: mgr...@gmail.com
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk

compile -cc1 --std=gnu++17

template  struct a;
template  class fbvector {
  static constexpr bool c = b ::e;
  fbvector(a);
};
template  fbvector(f)->fbvector;

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41221] [meta] 8.0.1 Release Blockers

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41221
Bug 41221 depends on bug 41223, which changed state.

Bug 41223 Summary: Merge r356924 into the 8.0 branch : merge-request.sh: Update 
8.0 metabug for 8.0.1
https://bugs.llvm.org/show_bug.cgi?id=41223

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41223] Merge r356924 into the 8.0 branch : merge-request.sh: Update 8.0 metabug for 8.0.1

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41223

Tom Stellard  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Fixed By Commit(s)|r356924 |r356924 r357234
 Resolution|--- |FIXED

--- Comment #2 from Tom Stellard  ---
Merged: r357234

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 40482] lld creates bogus dwarf info when linking gcc object files

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40482

George Rimar  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #31 from George Rimar  ---
Closing it then. Thanks, everyone for comments and help!

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41559] New: Clang does not break function arguments after comma

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41559

Bug ID: 41559
   Summary: Clang does not break function arguments after comma
   Product: clang
   Version: 8.0
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: normal
  Priority: P
 Component: Formatter
  Assignee: unassignedclangb...@nondot.org
  Reporter: rcdai...@gmail.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org

Original issue details on Stack Overflow here:
https://stackoverflow.com/questions/55763223/how-do-i-make-clang-format-wrap-functions-by-breaking-after-commas

I will quote the information below.


Suppose I have the following function definition:

```cpp
void MyVideoClass::Play(CJNIVideo* pJNIVideo, const char* pFile, float
startPos, bool bLooping, int nGLTextureId)
//  Column
Limit Here:>
```

Based on the column limit above, I expect the last argument to be wrapped and
then indented once:

```cpp
void MyVideoClass::Play(CJNIVideo* pJNIVideo, const char* pFile, float
startPos, bool bLooping,
   int nGLTextureId)
```

However, what I really get is:

```cpp
void MyVideoClass::Play(
   CJNIVideo* pJNIVideo, const char* pFile, float startPos, bool bLooping, int
nGLTextureId)
```

Here is my `.clang-format` (I'm using version 8.0.0 of LLVM):

```
---
Language:Cpp
AccessModifierOffset: -3
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands:   false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
  AfterClass:  true
  AfterControlStatement: true
  AfterEnum:   true
  AfterFunction:   true
  AfterNamespace:  true
  AfterObjCDeclaration: true
  AfterStruct: true
  AfterUnion:  true
  AfterExternBlock: true
  BeforeCatch: true
  BeforeElse:  true
  IndentBraces:true
  SplitEmptyFunction: true
  SplitEmptyRecord: true
  SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Allman
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: true
BreakStringLiterals: true
ColumnLimit: 100
CommentPragmas:  '^ IWYU pragma:'
CompactNamespaces: true
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 3
ContinuationIndentWidth: 3
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat:   false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
  - foreach
  - Q_FOREACH
  - BOOST_FOREACH
IncludeBlocks:   Preserve
IncludeCategories:
  - Regex:   '^"(llvm|llvm-c|clang|clang-c)/'
Priority:2
  - Regex:   '^(<|"(gtest|gmock|isl|json)/)'
Priority:3
  - Regex:   '.*'
Priority:1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 3
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd:   ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 3
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: false
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 2000
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 1
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments:  true
SortIncludes:true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles:  false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard:Cpp11
StatementMacros:
  - Q_UNUSED
  - QT_REQUIRE_VERSION
TabWidth:3
UseTab:  Never
...
```

Response to this question states that this is a bug:


You do have the correct settings 

[llvm-bugs] [Bug 41556] Bogus warning: all paths through this function will call itself

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41556

Richard Smith  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from Richard Smith  ---
The warning is correct; the program is wrong. It will print "{n: [" repeatedly
forever.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 12748 in oss-fuzz: llvm/llvm-isel-fuzzer--aarch64-O2: Out-of-memory in llvm_llvm-isel-fuzzer--aarch64-O2

2019-04-22 Thread sheriff… via monorail via llvm-bugs

Updates:
Labels: Deadline-Approaching

Comment #4 on issue 12748 by sheriff...@chromium.org:  
llvm/llvm-isel-fuzzer--aarch64-O2: Out-of-memory in  
llvm_llvm-isel-fuzzer--aarch64-O2

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12748#c4

This bug is approaching its deadline for being fixed, and will be  
automatically derestricted within 7 days. If a fix is planned within 2  
weeks after the deadline has passed, a grace extension can be granted.


- Your friendly Sheriffbot

--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 12773 in oss-fuzz: llvm/clang-fuzzer: Stack-overflow in clang::TreeTransform::TransformExpr

2019-04-22 Thread sheriff… via monorail via llvm-bugs

Updates:
Labels: Deadline-Approaching

Comment #4 on issue 12773 by sheriff...@chromium.org: llvm/clang-fuzzer:  
Stack-overflow in clang::TreeTransform::TransformExpr

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12773#c4

This bug is approaching its deadline for being fixed, and will be  
automatically derestricted within 7 days. If a fix is planned within 2  
weeks after the deadline has passed, a grace extension can be granted.


- Your friendly Sheriffbot

--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 12715 in oss-fuzz: llvm/clang-fuzzer: ASSERT: isa(Val) && "cast() argument of incompatible type!"

2019-04-22 Thread sheriff… via monorail via llvm-bugs

Updates:
Labels: Deadline-Approaching

Comment #4 on issue 12715 by sheriff...@chromium.org: llvm/clang-fuzzer:  
ASSERT: isa(Val) && "cast() argument of incompatible type!"

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12715#c4

This bug is approaching its deadline for being fixed, and will be  
automatically derestricted within 7 days. If a fix is planned within 2  
weeks after the deadline has passed, a grace extension can be granted.


- Your friendly Sheriffbot

--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 14404 in oss-fuzz: llvm/llvm-microsoft-demangle-fuzzer: ASSERT: !MangledName.empty()

2019-04-22 Thread tha… via monorail via llvm-bugs


Comment #2 on issue 14404 by tha...@chromium.org:  
llvm/llvm-microsoft-demangle-fuzzer: ASSERT: !MangledName.empty()

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14404#c2

http://reviews.llvm.org/rL358891 should fix.

--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 38761] Argument dependent lookup fails for a class nested in its base

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38761

Bruno Ricci  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 CC||riccib...@gmail.com

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41156] [AMDGPU][MC] Invalid handling of "-" before expressions

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41156

Dmitry  changed:

   What|Removed |Added

 Fixed By Commit(s)||r35, r358596
 Resolution|--- |FIXED
 Status|NEW |RESOLVED

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 14341 in oss-fuzz: llvm/llvm-microsoft-demangle-fuzzer: Stack-buffer-overflow in llvm::ms_demangle::Demangler::demangleStringLiteral

2019-04-22 Thread ClusterFuzz-External via monorail via llvm-bugs

Updates:
Labels: ClusterFuzz-Verified
Status: Verified

Comment #5 on issue 14341 by ClusterFuzz-External:  
llvm/llvm-microsoft-demangle-fuzzer: Stack-buffer-overflow in  
llvm::ms_demangle::Demangler::demangleStringLiteral

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14341#c5

ClusterFuzz testcase 5665174389784576 is verified as fixed, so closing  
issue as verified.


If this is incorrect, please file a bug on  
https://github.com/google/oss-fuzz/issues/new


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 14341 in oss-fuzz: llvm/llvm-microsoft-demangle-fuzzer: Stack-buffer-overflow in llvm::ms_demangle::Demangler::demangleStringLiteral

2019-04-22 Thread ClusterFuzz-External via monorail via llvm-bugs


Comment #4 on issue 14341 by ClusterFuzz-External:  
llvm/llvm-microsoft-demangle-fuzzer: Stack-buffer-overflow in  
llvm::ms_demangle::Demangler::demangleStringLiteral

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14341#c4

ClusterFuzz has detected this issue as fixed in range  
201904210259:201904220257.


Detailed report: https://oss-fuzz.com/testcase?key=5665174389784576

Project: llvm
Fuzzer: libFuzzer_llvm_llvm-microsoft-demangle-fuzzer
Fuzz target binary: llvm-microsoft-demangle-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Stack-buffer-overflow WRITE 1
Crash Address: 0x7f36250cf7e0
Crash State:
  llvm::ms_demangle::Demangler::demangleStringLiteral
  llvm::ms_demangle::Demangler::demangleSpecialIntrinsic
  llvm::ms_demangle::Demangler::parse

Sanitizer: address (ASAN)

Recommended Security Severity: High

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm=201901070410:201901080410
Fixed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm=201904210259:201904220257


Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=5665174389784576


See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
instructions to reproduce this bug locally.


If you suspect that the result above is incorrect, try re-doing that job on  
the test case report page.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 14405 in oss-fuzz: llvm/llvm-microsoft-demangle-fuzzer: Null-dereference READ in llvm::ms_demangle::Demangler::demangleTemplateParameterList

2019-04-22 Thread ClusterFuzz-External via monorail via llvm-bugs

Status: New
Owner: 
CC: k...@google.com, masc...@google.com, jdevlieg...@apple.com,  
igm...@gmail.com, mit...@google.com, bigchees...@gmail.com,  
eney...@google.com, llvm-b...@lists.llvm.org, j...@chromium.org,  
v...@apple.com, mitchphi...@outlook.com, xpl...@gmail.com,  
akils...@apple.com
Labels: ClusterFuzz Stability-Memory-AddressSanitizer Reproducible  
Engine-libfuzzer Proj-llvm Reported-2019-04-22

Type: Bug

New issue 14405 by ClusterFuzz-External:  
llvm/llvm-microsoft-demangle-fuzzer: Null-dereference READ in  
llvm::ms_demangle::Demangler::demangleTemplateParameterList

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14405

Detailed report: https://oss-fuzz.com/testcase?key=5646803271155712

Project: llvm
Fuzzer: libFuzzer_llvm_llvm-microsoft-demangle-fuzzer
Fuzz target binary: llvm-microsoft-demangle-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Null-dereference READ
Crash Address: 0x0010
Crash State:
  llvm::ms_demangle::Demangler::demangleTemplateParameterList
  llvm::ms_demangle::Demangler::demangleTemplateInstantiationName
  llvm::ms_demangle::Demangler::demangleNameScopeChain

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm=201901070410:201901080410


Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=5646803271155712


Issue filed automatically.

See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
instructions to reproduce this bug locally.


When you fix this bug, please
  * mention the fix revision(s).
  * state whether the bug was a short-lived regression or an old bug in any  
stable releases.

  * add any other useful information.
This information can help downstream consumers.

If you need to contact the OSS-Fuzz team with a question, concern, or any  
other feedback, please file an issue at  
https://github.com/google/oss-fuzz/issues.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 28039] Local classes must have an associated namespace since C++14

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=28039

Bruno Ricci  changed:

   What|Removed |Added

 CC||riccib...@gmail.com
 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Bruno Ricci  ---
Fixed by r358882.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 26182] Associated namespaces of local classes in ADL

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=26182

Bruno Ricci  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED
 CC||riccib...@gmail.com

--- Comment #1 from Bruno Ricci  ---
Fixed by r358882.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41558] New: wrong code with "opt -simplifycfg -structurizecfg -inline" (generated code hangs)

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41558

Bug ID: 41558
   Summary: wrong code with "opt   -simplifycfg  -structurizecfg
-inline" (generated code hangs)
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Scalar Optimizations
  Assignee: unassignedb...@nondot.org
  Reporter: csz...@163.com
CC: llvm-bugs@lists.llvm.org

Created attachment 21812
  --> https://bugs.llvm.org/attachment.cgi?id=21812=edit
.bc file of the source code

$clang -v
clang version 9.0.0 (trunk 355281)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm/build4/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.3.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

$clang -O3 -c -emit-llvm  -mllvm -disable-llvm-optzns small.c -o small.bc

$clang small.bc -o small1.out && ./small1.out
checksum = 9add2096

$opt -simplifycfg -structurizecfg  -inline small.bc -o small-opt1.bc
$clang small-opt.bc -o small2.out && timeout -s 9 10 ./small2.out
Killed

$opt -simplifycfg -structurizecfg  small.bc -o small-opt2.bc
$ clang small-opt2.bc -o small3.out &&  ./small3.out
checksum = d8f827eb

---
//
typedef signed char int8_t;
typedef int int32_t;
typedef long intint64_t;
/* Unsigned.  */
typedef unsigned char   uint8_t;
typedef unsigned short int  uint16_t;
typedef unsigned intuint32_t;
typedef unsigned long int   uint64_t;

static uint32_t crc32_tab[256];
static uint32_t crc32_context = 0xUL;

static void 
crc32_gentab (void)
{
uint32_t crc;
const uint32_t poly = 0xEDB88320UL;
int i, j;

for (i = 0; i < 256; i++) {
crc = i;
for (j = 8; j > 0; j--) {
if (crc & 1) {
crc = (crc >> 1) ^ poly;
} else {
crc >>= 1;
}
}
crc32_tab[i] = crc;
}
}

static void 
crc32_byte (uint8_t b) {
crc32_context = 
((crc32_context >> 8) & 0x00FF) ^ 
crc32_tab[(crc32_context ^ b) & 0xFF];
}


static void 
crc32_8bytes (uint64_t val)
{
crc32_byte ((val>>0) & 0xff);
crc32_byte ((val>>8) & 0xff);
crc32_byte ((val>>16) & 0xff);
crc32_byte ((val>>24) & 0xff);
crc32_byte ((val>>32) & 0xff);
crc32_byte ((val>>40) & 0xff);
crc32_byte ((val>>48) & 0xff);
crc32_byte ((val>>56) & 0xff);
}

static void 
transparent_crc (uint64_t val, char* vname, int flag)
{
crc32_8bytes(val);
if (flag) {
printf("...checksum after hashing %s : %lX\n", vname,
crc32_context ^ 0xUL);
}
}


static inline void
platform_main_end (uint64_t x, int flag)
{
  if (!flag) {
printf ("checksum = %llx\n", x);

  }
}

//

int a, b, c, d = 2;
uint16_t e(uint8_t);
int32_t *f(int32_t *, int32_t *, int32_t, uint8_t);
int32_t g(){}
int64_t h() {
  uint8_t k = e(0);
  return k;
}
uint16_t e(uint8_t j) {
  uint32_t *m = 
  uint8_t l = 0;
  f(g, m, j, j);
  return l;
}
int32_t *f(int32_t *o, int32_t *n, int32_t q, uint8_t p) {
  for (;;) {
int i;
for (; c <= 2;) {
  int32_t *s[9][3][9] = {};
  for (i = 0; i; i++)
;
  for (; i;)
i = 0;
  for (d = 0; d <= 2;)
return s[7][2][7];
}
for (; p; p++)
  ;
  }
}
void main() {
  int r = 0;
  crc32_gentab();
  h();
  transparent_crc(d, "", r);
  platform_main_end(crc32_context, 0);

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 14398 in oss-fuzz: llvm/llvm-microsoft-demangle-fuzzer: ASSERT: Pos >= 0

2019-04-22 Thread ClusterFuzz-External via monorail via llvm-bugs

Updates:
Labels: ClusterFuzz-Verified
Status: Verified

Comment #3 on issue 14398 by ClusterFuzz-External:  
llvm/llvm-microsoft-demangle-fuzzer: ASSERT: Pos >= 0

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14398#c3

ClusterFuzz testcase 5637072016113664 is verified as fixed, so closing  
issue as verified.


If this is incorrect, please file a bug on  
https://github.com/google/oss-fuzz/issues/new


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 14398 in oss-fuzz: llvm/llvm-microsoft-demangle-fuzzer: ASSERT: Pos >= 0

2019-04-22 Thread ClusterFuzz-External via monorail via llvm-bugs


Comment #2 on issue 14398 by ClusterFuzz-External:  
llvm/llvm-microsoft-demangle-fuzzer: ASSERT: Pos >= 0

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14398#c2

ClusterFuzz has detected this issue as fixed in range  
201904210259:201904220257.


Detailed report: https://oss-fuzz.com/testcase?key=5637072016113664

Project: llvm
Fuzzer: libFuzzer_llvm_llvm-microsoft-demangle-fuzzer
Fuzz target binary: llvm-microsoft-demangle-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: ASSERT
Crash Address:
Crash State:
  Pos >= 0
  outputEscapedChar
  llvm::ms_demangle::Demangler::demangleStringLiteral

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm=201901070410:201901080410
Fixed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm=201904210259:201904220257


Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=5637072016113664


See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
instructions to reproduce this bug locally.


If you suspect that the result above is incorrect, try re-doing that job on  
the test case report page.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 14404 in oss-fuzz: llvm/llvm-microsoft-demangle-fuzzer: ASSERT: !MangledName.empty()

2019-04-22 Thread ClusterFuzz-External via monorail via llvm-bugs

Status: New
Owner: 
CC: k...@google.com, masc...@google.com, jdevlieg...@apple.com,  
igm...@gmail.com, mit...@google.com, bigchees...@gmail.com,  
eney...@google.com, llvm-b...@lists.llvm.org, j...@chromium.org,  
v...@apple.com, mitchphi...@outlook.com, xpl...@gmail.com,  
akils...@apple.com
Labels: ClusterFuzz Stability-Memory-AddressSanitizer Reproducible  
Engine-libfuzzer Proj-llvm Reported-2019-04-22

Type: Bug

New issue 14404 by ClusterFuzz-External:  
llvm/llvm-microsoft-demangle-fuzzer: ASSERT: !MangledName.empty()

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14404

Detailed report: https://oss-fuzz.com/testcase?key=5643372422758400

Project: llvm
Fuzzer: libFuzzer_llvm_llvm-microsoft-demangle-fuzzer
Fuzz target binary: llvm-microsoft-demangle-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: ASSERT
Crash Address:
Crash State:
  !MangledName.empty()
  llvm::ms_demangle::Demangler::demangleCharLiteral
  llvm::ms_demangle::Demangler::demangleStringLiteral

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm=201901070410:201901080410


Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=5643372422758400


Issue filed automatically.

See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
instructions to reproduce this bug locally.


When you fix this bug, please
  * mention the fix revision(s).
  * state whether the bug was a short-lived regression or an old bug in any  
stable releases.

  * add any other useful information.
This information can help downstream consumers.

If you need to contact the OSS-Fuzz team with a question, concern, or any  
other feedback, please file an issue at  
https://github.com/google/oss-fuzz/issues.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41557] New: wrong code with "opt -structurizecfg -newgvn"

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41557

Bug ID: 41557
   Summary: wrong code with "opt -structurizecfg -newgvn"
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Scalar Optimizations
  Assignee: unassignedb...@nondot.org
  Reporter: csz...@163.com
CC: llvm-bugs@lists.llvm.org

Created attachment 21808
  --> https://bugs.llvm.org/attachment.cgi?id=21808=edit
.bc file of the source code

$clang -v
clang version 9.0.0 (trunk 355281)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm/build4/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.3.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

$clang -O3 -c -emit-llvm  -mllvm -disable-llvm-optzns small.c -o small.bc

$clang small.bc -o small1.out && ./small1.out
65535
0
0
0
0
0
0
0
0

$opt -sroa -simple-loop-unswitch -gvn small.bc -o small-opt1.bc
$clang small-opt1.bc -o small2.out && ./small2.out
65535
0
0
0
0
0
0
0
0

$opt -structurizecfg -newgvn   small-opt1.bc -o small-opt2.bc
$clang small-opt2.bc -o small3.out && ./small3.out
1792
0
0
0
0
0
0
0
0

$opt -structurizecfg   small-opt1.bc -o small-opt3.bc
$clang small-opt3.bc -o small4.out && ./small4.out
Segmentation fault (core dumped)

-
#include

unsigned int a, d;
unsigned short int b[1][9];
unsigned short int *c = b;
int **e;
int *f();
unsigned char g() {
  f(0, 0);
  return 0;
}
int *f(h, m) {
k:
  if (m < *c)
for (; d;) {
  *e = 
  for (; a;)
goto k;
}
  --*c;
  return 0;
}
void main() {
  int i, j, l = 0;
  g();
  for (i = j = 0; j < 9; j++){
 printf("%d\n",b[i][j]);
  }

}

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41556] New: Bogus warning: all paths through this function will call itself

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41556

Bug ID: 41556
   Summary: Bogus warning: all paths through this function will
call itself
   Product: clang
   Version: 6.0
  Hardware: PC
OS: FreeBSD
Status: NEW
  Severity: enhancement
  Priority: P
 Component: C++
  Assignee: unassignedclangb...@nondot.org
  Reporter: y...@tsoft.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk

Created attachment 21807
  --> https://bugs.llvm.org/attachment.cgi?id=21807=edit
infinite-recursion-testcase.cpp

It prints this bogus warning:
> $ c++ -Wall -o infinite-recursion-testcase infinite-recursion-testcase.cpp
> infinite-recursion-testcase.cpp:9:87: warning: all paths through this 
> function will call itself [-Winfinite-recursion]
> friend std::ostream& operator<<(std::ostream , const AtomSignature 
> ) {
>   
> ^
> 1 warning generated.


The warning is bogus because it calls itself with a different object. There is
no problem with infinite recursion there.
As long as there is variability in any of the arguments - there is no problem
with infinite recursion.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41356] LLD does not handle " " in InputSectionDescriptions correctly

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41356

George Rimar  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|CONFIRMED   |RESOLVED

--- Comment #3 from George Rimar  ---
r358874

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41555] New: Problem of parse typedef with template partial specialization.

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41555

Bug ID: 41555
   Summary: Problem of parse typedef with template partial
specialization.
   Product: clang
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Tooling
  Assignee: unassignedclangb...@nondot.org
  Reporter: burnss...@gmail.com
CC: llvm-bugs@lists.llvm.org

I use clang libTooling version 9.0 (latest release).

I have example of code with template with template partial specialization. And
where clang while parsing ,return result invalid declaration.

Example of code:

template < class T> class TYPE_A
{
};

template < class T, class U> class TYPE_B
{
};

template < class T, class U = TYPE_A > class TYPE_B;

typedef TYPE_B B_Test;


And when I parse this construction, I received invalid declaration for B_Test
type.

I have example of dump:
TypedefDecl 0x2024d557af0

col:27 invalid B_Test 'int'
`-BuiltinType 0x2024caff080 'int'

Please, help me for resolving this problem.

Thank you.

Best Regards,
Ivan.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 41554] New: Constant Hoist Makes Inconsistent Code Generation

2019-04-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=41554

Bug ID: 41554
   Summary: Constant Hoist Makes Inconsistent Code Generation
   Product: new-bugs
   Version: 7.0
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: manjian2...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

#include 
struct MemChunk {
  int a, flags;
};
void SlowFoo(void* a, void* b);
static const int kPageSizeBits = 19;
static inline MemChunk* ToMemChunk(void* o) {
  uintptr_t i = reinterpret_cast(o);
  const int page_mask = ~((1 << kPageSizeBits) - 1);
  i = i & page_mask;
  return reinterpret_cast(i);
}
void foo(void* a, void* b) {
  MemChunk* m_a = ToMemChunk(a);
  if ((m_a->flags & 2) == 0)
return;
  MemChunk* m_b = ToMemChunk(b);
  if ((m_b->flags & 2) == 0)
return;
  SlowFoo(a, b);
}

compiles with -target armv7-linux-androideabi -fPIC  -O3 -mllvm -debug   -S   
-march=armv7-a -mfloat-abi=softfp -mfpu=neon -marm  
--sysroot=/home/linzj/android-ndk-r13b/platforms/android-15/arch-arm/
--gcc-toolchain=/home/linzj/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/
-fomit-frame-pointer -fvisibility=hidden

And gen

mov r2, #4
mov r3, r0
bfi r3, r2, #0, #19
ldrbr2, [r3]
tst r2, #2
bxeqlr
movwr2, #0
movtr2, #65528
and r2, r1, r2
ldrbr2, [r2, #4]
tst r2, #2
bne .LBB0_2
@ %bb.1:
bx  lr
.LBB0_2:
b   _Z7SlowFooPvS_

note that the first and is combined as bfi instruction, but the second one
would not.
I think
mov r2, #4
mov r3, r0
bfi r3, r2, #0, #19
ldrbr3, [r3]
tst r3, #2
bxeqlr
mov r3, r1
bfi r3, r2, #0, #19
ldrbr2, [r3]
tst r2, #2
bne .LBB0_2
@ %bb.1:@ %cleanup7
bx  lr
.LBB0_2:@ %if.end6
b   _Z7SlowFooPvS_

is better output.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs