[llvm-bugs] [Bug 43645] New: loop-versioning crashes: Assertion `L->getLoopPreheader() && "Can't expand add recurrences without a loop preheader!"' failed.

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43645

Bug ID: 43645
   Summary: loop-versioning crashes: Assertion
`L->getLoopPreheader() && "Can't expand add
recurrences without a loop preheader!"' failed.
   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 22653
  --> https://bugs.llvm.org/attachment.cgi?id=22653&action=edit
CHOLESKY1.bc

$clang -v
clang version 10.0.0 (trunk 373844)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/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.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

$opt -loop-rotate -mem2reg -loop-unswitch -loop-unswitch -simplifycfg
-loop-versioning CHOLESKY1.bc 
WARNING: You're attempting to print out a bitcode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bitcode first-hand, you
can force output with the `-f' option.

opt:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/lib/Analysis/ScalarEvolutionExpander.cpp:1267:
llvm::PHINode* llvm::SCEVExpander::getAddRecExprPHILiterally(const
llvm::SCEVAddRecExpr*, const llvm::Loop*, llvm::Type*, llvm::Type*,
llvm::Type*&, bool&): Assertion `L->getLoopPreheader() && "Can't expand add
recurrences without a loop preheader!"' failed.
Stack dump:
0.  Program arguments:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt -loop-rotate
-mem2reg -loop-unswitch -loop-unswitch -simplifycfg -loop-versioning
CHOLESKY1.bc 
1.  Running pass 'Function Pass Manager' on module 'CHOLESKY1.bc'.
2.  Running pass 'Loop Versioning' on function '@ScatterUpdateFO2'
 #0 0x5617069b7baa llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x2791baa)
 #1 0x5617069b5884 llvm::sys::RunSignalHandlers()
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x278f884)
 #2 0x5617069b59c2 SignalHandler(int)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x278f9c2)
 #3 0x7fe158508890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x7fe1571bae97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #5 0x7fe1571bc801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #6 0x7fe1571ac39a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
 #7 0x7fe1571ac412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
 #8 0x561705d65fe2
llvm::SCEVExpander::getAddRecExprPHILiterally(llvm::SCEVAddRecExpr const*,
llvm::Loop const*, llvm::Type*, llvm::Type*, llvm::Type*&, bool&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x1b3ffe2)
 #9 0x561705d661b4
llvm::SCEVExpander::expandAddRecExprLiterally(llvm::SCEVAddRecExpr const*)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x1b401b4)
#10 0x561705d62a60 llvm::SCEVExpander::expand(llvm::SCEV const*)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x1b3ca60)
#11 0x561705d62f9c llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*,
llvm::Type*)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x1b3cf9c)
#12 0x561705c5b6cb
expandBounds(llvm::RuntimePointerChecking::CheckingPtrGroup const*,
llvm::Loop*, llvm::Instruction*, llvm::SCEVExpander&, llvm::ScalarEvolution*,
llvm::RuntimePointerChecking const&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x1a356cb)
#13 0x561705c5bbf8
llvm::LoopAccessInfo::addRuntimeChecks(llvm::Instruction*,
llvm::SmallVectorImpl > const&) const
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x1a35bf8)
#14 0x561706a7ad82
llvm::LoopVersioning::versionLoop(llvm::SmallVectorImpl
const&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x2854d82)
#15 0x561706a7c6f0 (anonymous
namespace)::LoopVersioningPass::runOnFunction(llvm::Function&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x28566f0)
#16 0x5617062f1a49 llvm::FP

[llvm-bugs] [Bug 43646] New: variant converting constructor fails for primitives

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43646

Bug ID: 43646
   Summary: variant converting constructor fails for primitives
   Product: libc++
   Version: 9.0
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: All Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: p...@patrickjohnston.org
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com

Minimal testcase: https://wandbox.org/permlink/ehmmOwVOnMDieULB (includes
output of clang++ -v).

The problem did not exist in v8.0.0.

Note that the implementation of
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0608r3.html might be
related, but p0608 itself shouldn't be causing the variant converting
constructor to not match.

Compared to before, p0608 only requires that `double x[] = {600};` is well
formed. See https://wandbox.org/permlink/WZv2Qb98GcYD5JR5

-- 
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 18129 in oss-fuzz: llvm:llvm-dwarfdump-fuzzer: ASSERT: !checkOffset(Data, uintptr_t(Addr), sizeof(*Addr))

2019-10-11 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 OS-Linux Proj-llvm Reported-2019-10-11

Type: Bug

New issue 18129 by ClusterFuzz-External: llvm:llvm-dwarfdump-fuzzer:  
ASSERT: !checkOffset(Data, uintptr_t(Addr), sizeof(*Addr))

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

Detailed Report: https://oss-fuzz.com/testcase?key=5680581760778240

Project: llvm
Fuzzing Engine: libFuzzer
Fuzz Target: llvm-dwarfdump-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: ASSERT
Crash Address:
Crash State:
  !checkOffset(Data, uintptr_t(Addr), sizeof(*Addr))
   
llvm::object::coff_symbol
  llvm::object::COFFObjectFile::getSymbolFlags

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201907180312:201907190312


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


Issue filed automatically.

See https://google.github.io/oss-fuzz/advanced-topics/reproducing 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. Comments on individual Monorail  
issues are not monitored.


--
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 42924] Address Sanitizer compilation time regression

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=42924

Luke  changed:

   What|Removed |Added

 Resolution|FIXED   |---
 CC||lukebe...@hotmail.com
 Status|RESOLVED|REOPENED

-- 
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 43360] [meta] 9.0.1 Release Blockers

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43360
Bug 43360 depends on bug 42924, which changed state.

Bug 42924 Summary: Address Sanitizer compilation time regression
https://bugs.llvm.org/show_bug.cgi?id=42924

   What|Removed |Added

 Status|RESOLVED|REOPENED
 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 43647] New: no warnings with -Waddress

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43647

Bug ID: 43647
   Summary: no warnings with -Waddress
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Frontend
  Assignee: unassignedclangb...@nondot.org
  Reporter: tangyix...@mail.dlut.edu.cn
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk

clang-10 falls to emit the warning for the following:

$ cat s.c
  int main()
  {
int *a = (void *) 0;
int b = (&a) == ((void *) 0);
return b;
  }

$ clang-10 -Weverything -pedantic s.c

clang version 10.0.0 (https://github.com/llvm/llvm-project.git
49c4e58b75ecec8dce75dd13c61aaeb30e14b531)
Target: x86_64-unknown-linux-gnu
Thread model: posix

[-Waddress] is enabled by default in Clang, but do not issue the warning. When
compiled with GCC, warnings such as:

$ gcc -Wall s.c
s.c: In function ‘main’:
s.c:4:16: warning:the comparison will always evaluate as ‘false’ for the
address of ‘a’ will never be NULL [-Waddress]
4 |   int b = (&a) == ((void *) 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] [Bug 43486] [AMDGPU][MC][GFX9][GFX10] GLOBAL ATOMIC opcodes do not accept 'slc' with saddr=off

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43486

Dmitry  changed:

   What|Removed |Added

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

-- 
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 43648] New: Comments after preprocessor directives are misaligned to code-level

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43648

Bug ID: 43648
   Summary: Comments after preprocessor directives are misaligned
to code-level
   Product: clang
   Version: 9.0
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: Formatter
  Assignee: unassignedclangb...@nondot.org
  Reporter: clemens...@gmail.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org

Comments before preprocessor directives are correctly identified as belonging
to the directive and are not aligned to code-level.

The line '// FOO begins' in the following example is not changed by
clang-format. This works as expected.

void main(void) {
  int i = 0;

// FOO begins
#ifdef FOO
  i++;
#endif
// FOO ends
}

However, clang-format (tested with version 9.0.0) does indent the line '// FOO
ends', which is not correct in my opinion. Similar to a namespace end comment,
this tells readers which ifdef this endif is closing and should be aligned with
the directive, or at least be preserved if it is already aligned that way.

-- 
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 43524] [AMDGPU][MC][GFX10] null cannot be used with 64-bit dst operands

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43524

Dmitry  changed:

   What|Removed |Added

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

-- 
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 28232] [mc] buffer_dwordx3, buffer_atomic_fcmpswap/fmin/mfax are not supported.

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=28232

Dmitry  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Fixed By Commit(s)||374559
 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 37941] [AMDGPU][MC][GFX9] Invalid number of src operands for ds_[read/write]_addtid_b32

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=37941

Dmitry  changed:

   What|Removed |Added

 Fixed By Commit(s)||374561
 Resolution|--- |FIXED
 Status|CONFIRMED   |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 43649] New: Suboptimal code for llvm.ssub.sat.i32

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43649

Bug ID: 43649
   Summary: Suboptimal code for llvm.ssub.sat.i32
   Product: new-bugs
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: tspit...@ieee.org
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

The following IR:

define i32 @_ZN7example14saturating_sub17h23583ee3c8b034a4E(i32 %a, i32 %b)
unnamed_addr #0 !dbg !5 {
start:
  %0 = tail call i32 @llvm.ssub.sat.i32(i32 %a, i32 %b) #2, !dbg !8
  ret i32 %0, !dbg !15
}

declare i32 @llvm.ssub.sat.i32(i32, i32) #1

attributes #0 = { nounwind nonlazybind readnone uwtable
"probe-stack"="__rust_probestack" "target-cpu"="x86-64" }
attributes #1 = { nounwind readnone speculatable }
attributes #2 = { nounwind }

results in the following asm:

example::saturating_sub:
xor eax, eax
mov ecx, edi
sub ecx, esi
setns   al
add eax, 2147483647
sub edi, esi
cmovno  eax, edi
ret

I think the `mov ecx, edi` and `sub ecx, esi` instructions should be replaced
by a `cmp esi, edi` instruction.

-- 
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 43650] New: [X86] Poor +/-1 integer sign extraction

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43650

Bug ID: 43650
   Summary: [X86] Poor +/-1 integer sign extraction
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: X86
  Assignee: unassignedb...@nondot.org
  Reporter: llvm-...@redking.me.uk
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
llvm-...@redking.me.uk, spatel+l...@rotateright.com

https://godbolt.org/z/1ZT4eo

int sign_negone_one(int x)
{
return x < 0 ? -1 : 1;
}

clang:

sign_negone_one:
  notl %edi
  shrl $31, %edi
  leal (%rdi,%rdi), %eax
  addl $-1, %eax
  retq

vs gcc:

sign_negone_one:
  movl %edi, %eax
  sarl $31, %eax
  orl $1, %eax
  ret

-- 
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 43646] variant converting constructor fails for primitives

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43646

Marshall Clow (home)  changed:

   What|Removed |Added

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

--- Comment #1 from Marshall Clow (home)  ---
This is the same bug as you reported to libstdc++:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92057

I worked with Jonathan in his analysis, and I concur with his conclusion that
this *is* a narrowing conversion, and should be rejected.

The `double x[] = {600};` is a red herring because 600 is a constant.

Resolving as invalid.

-- 
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 43651] New: Add support to -Wa,-W in clang

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43651

Bug ID: 43651
   Summary: Add support to -Wa,-W in clang
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: caij2...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk

Currently clang does not support -Wa,-W.

$ cat test.c 


int main () {return 0;}
$ clang -Wa,-W test.c 
clang: error: unsupported argument '-W' to option 'Wa,'



>From man page of GNU as:

   -W
   --no-warn
   Suppress warning messages.

We need this option for gcc compability.

-- 
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 43652] New: ThinLTO + -fno-sanitize-cfi-canonical-jump-tables doesn't work with function aliases

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43652

Bug ID: 43652
   Summary: ThinLTO + -fno-sanitize-cfi-canonical-jump-tables
doesn't work with function aliases
   Product: new-bugs
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: new bugs
  Assignee: pe...@pcc.me.uk
  Reporter: samitolva...@google.com
CC: htmldevelo...@gmail.com, jgalen...@google.com,
llvm-bugs@lists.llvm.org

If I compile my program with ThinLTO and
-fno-sanitize-cfi-canonical-jump-tables, I cannot make an indirect call to a
function alias. I can reproduce the issue as follows:

$ cat test.c 
#include 

typedef int (*func_t)(int);

int a(int n)
{
return 1;
}

int b(int n) __attribute__((alias("a")));

int main()
{
func_t f[] = { a, b, NULL };

for (int i = 0; f[i] != NULL; i++) {
printf("calling %016lx\n", (unsigned long)f[i]);
printf("\t-> %d\n", f[i](0));
}

return 0;
}

I would expect indirect calls to both a and b work fine with CFI, as seen here:

$ clang -flto=thin -fuse-ld=lld -fvisibility=default -fsanitize=cfi test.c 
$ ./a.out 
calling 002017b0
-> 1
calling 002017b0
-> 1

However, if I enable -fno-sanitize-cfi-canonical-jump-tables, the test program
fails to compile:

$ clang -flto=thin -fuse-ld=lld -fvisibility=default -fsanitize=cfi
-fno-sanitize-cfi-canonical-jump-tables test.c 
ld.lld: error: undefined symbol: a
>>> referenced by ld-temp.o
>>>   lto.tmp:(a.cfi_jt)
clang-10: error: linker command failed with exit code 1 (use -v to see
invocation)

Adding -fsanitize-cfi-cross-dso allows me to compile the program again, but it
now trips CFI:

$ clang -flto=thin -fuse-ld=lld -fvisibility=default -fsanitize=cfi
-fno-sanitize-cfi-canonical-jump-tables -fsanitize-cfi-cross-dso test.c 
$ ./a.out 
calling 5648c2aab030
-> 1
calling 5648c2aab040
Illegal instruction

Looking at a.out, we have:

  1125: 00029030 8 FUNCLOCAL  HIDDEN14 a.cfi_jt
  1204: 0002904014 FUNCGLOBAL DEFAULT   14 a
  1207: 0002904014 FUNCGLOBAL DEFAULT   14 b

Which means the alias points directly to a, instead of a.cfi_jt. Switching to
-flto works though:

$ clang -flto -fuse-ld=lld -fvisibility=default -fsanitize=cfi
-fno-sanitize-cfi-canonical-jump-tables -fsanitize-cfi-cross-dso test.c 
$ ./a.out 
calling 563f82e14030
-> 1
calling 563f82e14030
-> 1

This is currently reproducible with ToT LLVM:

$ clang --version | head -n1
clang version 10.0.0 (https://github.com/llvm/llvm-project.git
b95d4c3a99794f57b3ac7accd86f5c061f6c69f9)
$ ld.lld --version
LLD 10.0.0 (https://github.com/llvm/llvm-project.git
b95d4c3a99794f57b3ac7accd86f5c061f6c69f9) (compatible with GNU linkers)

-- 
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 43360] [meta] 9.0.1 Release Blockers

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43360
Bug 43360 depends on bug 42979, which changed state.

Bug 42979 Summary: clang/test/Driver/modules.cpp fails when build directory 
contains '.s' in its name
https://bugs.llvm.org/show_bug.cgi?id=42979

   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 42979] clang/test/Driver/modules.cpp fails when build directory contains '.s' in its name

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=42979

Tom Stellard  changed:

   What|Removed |Added

 Fixed By Commit(s)|r373275 |r373275 r374605
 Status|CONFIRMED   |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Tom Stellard  ---
Merged: r374605

-- 
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 43653] New: clangFormat doesn't follow SpacesInParentheses for operator* declaration

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43653

Bug ID: 43653
   Summary: clangFormat doesn't follow SpacesInParentheses for
operator* declaration
   Product: clang
   Version: 8.0
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Formatter
  Assignee: unassignedclangb...@nondot.org
  Reporter: maxim.ban...@gmail.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org

$ cat foo.cpp

class Foo {
public:
  Foo operator*(int &)const;
};

$ cat .clang-format
Language: Cpp
BasedOnStyle: LLVM
SpacesInParentheses: true

Command executed:
$ clang-format -i foo.cpp

Actual:
class Foo {
public:
  Foo operator*(int &)const;
};

Expected
class Foo {
public:
  Foo operator*( int & ) const;
};


Expected that clangFormat does add spaces in ().
Works file for:
Foo operator+(int &)const;
Foo operator*(int &i)const;
Foo operator*(int &);

-- 
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 18151 in oss-fuzz: llvm:clang-fuzzer: ASSERT: (!NonEmptyPasteBefore || PasteBefore || VCtx.isInVAOpt()) && "unexpected ## in R

2019-10-11 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 OS-Linux Proj-llvm Reported-2019-10-11

Type: Bug

New issue 18151 by ClusterFuzz-External: llvm:clang-fuzzer: ASSERT:  
(!NonEmptyPasteBefore || PasteBefore || VCtx.isInVAOpt()) && "unexpected ##  
in R

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

Detailed Report: https://oss-fuzz.com/testcase?key=5650947962830848

Project: llvm
Fuzzing Engine: libFuzzer
Fuzz Target: clang-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: ASSERT
Crash Address:
Crash State:
  (!NonEmptyPasteBefore || PasteBefore || VCtx.isInVAOpt()) && "unexpected  
## in R

  clang::TokenLexer::ExpandFunctionArguments
  clang::TokenLexer::Init

Sanitizer: address (ASAN)

Crash Revision:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&revision=201910100324


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


Issue filed automatically.

See https://google.github.io/oss-fuzz/advanced-topics/reproducing 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. Comments on individual Monorail  
issues are not monitored.


--
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 18156 in oss-fuzz: llvm:clang-fuzzer: Stack-overflow in clang::Preprocessor::PeekAhead

2019-10-11 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 OS-Linux Proj-llvm Reported-2019-10-12

Type: Bug

New issue 18156 by ClusterFuzz-External: llvm:clang-fuzzer: Stack-overflow  
in clang::Preprocessor::PeekAhead

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

Detailed Report: https://oss-fuzz.com/testcase?key=5729645990772736

Project: llvm
Fuzzing Engine: libFuzzer
Fuzz Target: clang-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Stack-overflow
Crash Address: 0x7fff51124e08
Crash State:
  clang::Preprocessor::PeekAhead
  clang::Parser::isCXX11AttributeSpecifier
  clang::Parser::ParseDeclarationSpecifiers

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201910080333:201910090334


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


Issue filed automatically.

See https://google.github.io/oss-fuzz/advanced-topics/reproducing 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. Comments on individual Monorail  
issues are not monitored.


--
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 43415] Merge r372606 into 9.0.1

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43415

Tom Stellard  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED
 Fixed By Commit(s)|r372606 |r372606 r374633

--- Comment #3 from Tom Stellard  ---
Merged: r374633

-- 
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 43360] [meta] 9.0.1 Release Blockers

2019-10-11 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=43360
Bug 43360 depends on bug 43415, which changed state.

Bug 43415 Summary: Merge r372606 into 9.0.1
https://bugs.llvm.org/show_bug.cgi?id=43415

   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