[llvm-bugs] [Bug 50429] New: missing space between * and a variable

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50429

Bug ID: 50429
   Summary: missing space between * and a variable
   Product: clang
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Formatter
  Assignee: unassignedclangb...@nondot.org
  Reporter: hly1...@qq.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org

It seems that the `*` at the end was formatted with no space after it.

--
std::pair crt2(int a, int m1, int b, int m2) {
  return std::make_pair(int(ll(b + m2 - a % m2) % m2 * inv_mod(m1, m2) % m2 *
m1 + a), m1 *m2);
}
--

With the following settings:

--
BasedOnStyle: LLVM
Standard: Cpp11
PointerAlignment: Right
UseTab: Never
IndentWidth: 2
AccessModifierOffset: -2
AllowShortIfStatementsOnASingleLine: true
AlwaysBreakTemplateDeclarations: false
AllowShortLoopsOnASingleLine: true
ColumnLimit: 100
--

-- 
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 50430] New: Mangling of substitutions for nested depending types differs from GCC and llvm-cxxfilt

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50430

Bug ID: 50430
   Summary: Mangling of substitutions for nested depending types
differs from GCC and llvm-cxxfilt
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: joac...@joameyer.de
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk

When trying to use GCC as host compiler for SYCL-BLAS and Clang as device /
library compiler, I could not link successfully, as there was a mangling
discrepancy.

I tried to reduce the example and ended up with:
https://godbolt.org/z/967PWWdv8
The difference is in the sequence id of the 3rd parameter, which should reuse
the 2nd parameter's template type.

When demangling using llvm-cxxfilt, Clang's mangling results in the 3rd
parameter's type to match the 1st parameter type's type instead of the second:

$ llvm-cxxfilt _Z1fI12TemplateTypeI8UsedTypeEiENT_6InnerT7NestedTERS3_T0_S6_
TemplateType::InnerT::NestedT f,
int>(TemplateType&, int, TemplateType&)

GCC references the correct one, as of llvm-cxxfilt:
$ llvm-cxxfilt _Z1fI12TemplateTypeI8UsedTypeEiENT_6InnerT7NestedTERS3_T0_S7_
TemplateType::InnerT::NestedT f,
int>(TemplateType&, int, int)

The offending type that is counted differently, is the nested depending types
-> it works if the return type would be `TemplateType::InnerT`
instead of `TemplateType::InnerT::NestedT` (see f2 in godbolt
example).

-- 
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 50431] New: clang crashes on valid code at -O1 and above on x86_64-linux-gnu: Assertion `isReg() && "This is not a register operand!"' failed

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50431

Bug ID: 50431
   Summary: clang crashes on valid code at -O1 and above on
x86_64-linux-gnu: Assertion `isReg() && "This is not a
register operand!"' failed
   Product: libraries
   Version: trunk
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: MC
  Assignee: unassignedb...@nondot.org
  Reporter: zhendong...@inf.ethz.ch
CC: llvm-bugs@lists.llvm.org

[522] % clangtk -v
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
5e327785da36fa3a00767cfea0a47fcb0f0814aa)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/suz-local/opfuzz/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
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.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
[523] % 
[523] % clangtk -O0 small.c
[524] % 
[524] % clangtk -O1 small.c
clang-13:
/local/suz-local/software/clangbuild/llvm-project/llvm/include/llvm/MC/MCInst.h:70:
unsigned int llvm::MCOperand::getReg() const: Assertion `isReg() && "This is
not a register operand!"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.  Program arguments:
/local/suz-local/software/local/clang-trunk/bin/clang-13 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj --mrelax-relocations -disable-free
-main-file-name small.c -mrelocation-model static -mframe-pointer=none
-fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables
-target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb
-fcoverage-compilation-dir=/local/suz-local/software/emitesting/bugs/20210517-clangtk-m64-O3-build-131816/delta
-resource-dir /local/suz-local/software/local/clang-trunk/lib/clang/13.0.0
-internal-isystem
/local/suz-local/software/local/clang-trunk/lib/clang/13.0.0/include
-internal-isystem /usr/local/include -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../x86_64-linux-gnu/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O1
-fdebug-compilation-dir=/local/suz-local/software/emitesting/bugs/20210517-clangtk-m64-O3-build-131816/delta
-ferror-limit 19 -fgnuc-version=4.2.1 -fcolor-diagnostics -faddrsig
-D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/small-0f9e5d.o -x c small.c
1.   parser at end of file
2.  Code generation
3.  Running pass 'Function Pass Manager' on module 'small.c'.
4.  Running pass 'X86 Assembly Printer' on function '@main'
 #0 0x5600fe8057cc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x374c7cc)
 #1 0x5600fe803684 llvm::sys::RunSignalHandlers()
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x374a684)
 #2 0x5600fe8037f3 SignalHandler(int) Signals.cpp:0:0
 #3 0x7f04b299f980 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
 #4 0x7f04b1650fb7 raise
/build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #5 0x7f04b1652921 abort /build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81:0
 #6 0x7f04b164248a __assert_fail_base
/build/glibc-S9d2JN/glibc-2.27/assert/assert.c:89:0
 #7 0x7f04b1642502 (/lib/x86_64-linux-gnu/libc.so.6+0x30502)
 #8 0x5600fc283bef
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x11cabef)
 #9 0x5600fd710411
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x2657411)
#10 0x5600fd71176d (anonymous
namespace)::X86MCCodeEmitter::encodeInstruction(llvm::MCInst const&,
llvm::raw_ostream&, llvm::SmallVectorImpl&,
llvm::MCSubtargetInfo const&) const X86MCCodeEmitter.cpp:0:0
#11 0x5600fe3e92e5 llvm::MCELFStreamer::emitInstToData(llvm::MCInst const&,
llvm::MCSubtargetInfo const&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x33302e5)
#12 0x5600fe406ecb llvm::MCObjectStreamer::emitInstructionImpl(llvm::MCInst
const&, llvm::MCSubtargetInfo const&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x334decb)
#13 0x5600fe4070fc llvm::MCObjectStreamer::emitInstruction(llvm::MCInst
const&, llvm::MCSubtargetInfo const&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x334e0fc)
#14 0x5600fd42fe33
llvm::X86AsmPrinter::EmitAndCountInstruction(llvm::MCInst&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x2376e33)

[llvm-bugs] [Bug 50432] New: generating the "__floatunditf" for arm64 .

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50432

Bug ID: 50432
   Summary: generating the "__floatunditf" for arm64 .
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: C11
  Assignee: unassignedclangb...@nondot.org
  Reporter: umesh.kalap...@gmail.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk

compiler emits the "__floatunditf" call for arm64 i.e 

$cat test.c 
double funct(unsigned long long num)

{ 
long double test_number = 1.8; 
return (double) (test_number / num) ; 
}
int main_test_error(void)
{ 
funct(178394848); 
return 0; 
}

$clang --target=aarch64-arm-none-eabi -S test.c -O2
$cat test.s 
funct:  // @funct
// %bb.0:
stp x29, x30, [sp, #-16]!   // 16-byte Folded Spill
mov x29, sp
bl  __floatunditf
adrpx8, .LCPI0_0
mov v1.16b, v0.16b
ldr q0, [x8, :lo12:.LCPI0_0]
bl  __divtf3
bl  __trunctfdf2
ldp x29, x30, [sp], #16 // 16-byte Folded Reload
ret
.Lfunc_end0:

the calls like "__floatunditf" ,"__divtf3" and "__trunctfdf2" is not part
compiler_rt builtins for arm /arm  64 .

we believe that  the compiler should generate the call "__aeabi_ul2d"  and
"__aeabi_ddiv" for arm  and we conclude its bug in compiler and we can fix the
same .

-- 
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 50433] New: wasm32: v128.load8_lane not used with equivalent pattern

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50433

Bug ID: 50433
   Summary: wasm32: v128.load8_lane not used with equivalent
pattern
   Product: libraries
   Version: trunk
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: WebAssembly
  Assignee: unassignedb...@nondot.org
  Reporter: a...@crichton.co
CC: llvm-bugs@lists.llvm.org

Given this LLVM IR:



; ModuleID = 'foo.3a1fbbbh-cgu.0'
source_filename = "foo.3a1fbbbh-cgu.0"
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-wasi"

; Function Attrs: norecurse nounwind readonly willreturn
define dso_local <4 x i32> @v128_load8_lane(i32* nocapture readonly %a, <4 x
i32> %b) unnamed_addr #0 {
start:
  %_4 = load i32, i32* %a, align 4
  %0 = insertelement <4 x i32> %b, i32 %_4, i32 2
  ret <4 x i32> %0
}

attributes #0 = { norecurse nounwind readonly willreturn "target-cpu"="generic"
"target-features"="+simd128" }




this doesn't currently optimize to use the `v128.load8_lane` intrinsic, it
requires using the `llvm.wasm.load32.lane` intrinsic. While not super
problematic it'd be nice if this equivalent pattern was recognized because it'd
allow easy configuration of the alignment on `v128.load8_lane` since it happens
via the `load` instruction separately.

-- 
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 50434] New: wasm32: v128.load32_zero not used with equivalent pattern

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50434

Bug ID: 50434
   Summary: wasm32: v128.load32_zero not used with equivalent
pattern
   Product: libraries
   Version: trunk
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: WebAssembly
  Assignee: unassignedb...@nondot.org
  Reporter: a...@crichton.co
CC: llvm-bugs@lists.llvm.org

Given this LLVM IR:



; ModuleID = 'foo.3a1fbbbh-cgu.0'
source_filename = "foo.3a1fbbbh-cgu.0"
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-wasi"

; Function Attrs: norecurse nounwind readonly willreturn
define dso_local <4 x i32> @v128_load32_zero(i32* nocapture readonly %a, <4 x
i32> %b) unnamed_addr #0 {
start:
  %_3 = load i32, i32* %a, align 4
  %_5.12.vec.insert.i.i = insertelement <4 x i32> , i32 %_3, i32 0
  ret <4 x i32> %_5.12.vec.insert.i.i
}

attributes #0 = { norecurse nounwind readonly willreturn "target-cpu"="generic"
"target-features"="+simd128" }




this doesn't currently optimize to use the `v128.load32_zero` intrinsic, it
requires using the `llvm.wasm.load32.zero` intrinsic. While not super
problematic it'd be nice if this equivalent pattern was recognized because it'd
allow easy configuration of the alignment on `v128.load32_zero` since it
happens via the `load` instruction separately.

-- 
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 50435] New: wasm32: v128.store32_zero not used with equivalent pattern

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50435

Bug ID: 50435
   Summary: wasm32: v128.store32_zero not used with equivalent
pattern
   Product: libraries
   Version: trunk
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: WebAssembly
  Assignee: unassignedb...@nondot.org
  Reporter: a...@crichton.co
CC: llvm-bugs@lists.llvm.org

Given this LLVM IR:


; ModuleID = 'foo.3a1fbbbh-cgu.0'
source_filename = "foo.3a1fbbbh-cgu.0"
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-wasi"

; Function Attrs: nofree norecurse nounwind willreturn writeonly
define dso_local void @v128_store32_lane(i32* nocapture %a, <4 x i32> %b)
unnamed_addr #0 {
start:
  %0 = extractelement <4 x i32> %b, i32 2
  store i32 %0, i32* %a, align 4
  ret void
}

attributes #0 = { nofree norecurse nounwind willreturn writeonly
"target-cpu"="generic" "target-features"="+simd128" }




this doesn't currently optimize to use the `v128.store32_lane` intrinsic, it
requires using the `llvm.wasm.store32.lane` intrinsic. While not super
problematic it'd be nice if this equivalent pattern was recognized because it'd
allow easy configuration of the alignment on `v128.store32_zero` since it
happens via the `store` instruction separately.

-- 
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 50426] [[no_unique_address]] causes clang-tidy to crash with Assertion `!DiffPad.isNegative() && "DiffPad should not be negative"' failed

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50426

Eugene Zelenko  changed:

   What|Removed |Added

 CC||dcough...@apple.com,
   ||eugene.zele...@gmail.com,
   ||llvm-bugs@lists.llvm.org
Product|clang-tools-extra   |clang
  Component|clang-tidy  |Static Analyzer
   Assignee|unassignedclangbugs@nondot. |dcough...@apple.com
   |org |

-- 
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 49560] apt packages fail to install on Ubuntu 16.04 Xenial

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=49560

Sam Darwin  changed:

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

2021-05-21 Thread ClusterFuzz-External via monorail via llvm-bugs
Updates:
Labels: ClusterFuzz-Verified
Status: Verified

Comment #1 on issue 34035 by ClusterFuzz-External: llvm:clang-fuzzer: 
Stack-overflow in clang::Preprocessor::PeekAhead
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34035#c1

ClusterFuzz testcase 4517765131141120 is verified as fixed in 
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=202105200619:202105210629

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 34015 in oss-fuzz: llvm:clang-fuzzer: Stack-overflow in UnqualUsingDirectiveSet::visitScopeChain

2021-05-21 Thread ClusterFuzz-External via monorail via llvm-bugs
Updates:
Labels: ClusterFuzz-Verified
Status: Verified

Comment #1 on issue 34015 by ClusterFuzz-External: llvm:clang-fuzzer: 
Stack-overflow in UnqualUsingDirectiveSet::visitScopeChain
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34015#c1

ClusterFuzz testcase 5295327604244480 is verified as fixed in 
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=202105200619:202105210629

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 34392 in oss-fuzz: llvm:llvm-microsoft-demangle-fuzzer: Stack-overflow in memchr

2021-05-21 Thread ClusterFuzz-External via monorail via llvm-bugs
Updates:
Status: WontFix

Comment #1 on issue 34392 by ClusterFuzz-External: 
llvm:llvm-microsoft-demangle-fuzzer: Stack-overflow in memchr
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34392#c1

ClusterFuzz testcase 5544151518150656 is closed as invalid, so closing issue.

-- 
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 50436] New: Codegen for shuffle (similar to vget_low_s8) can be improved

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50436

Bug ID: 50436
   Summary: Codegen for shuffle (similar to vget_low_s8) can be
improved
   Product: libraries
   Version: trunk
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: WebAssembly
  Assignee: tliv...@google.com
  Reporter: z...@google.com
CC: llvm-bugs@lists.llvm.org

PTAL https://godbolt.org/z/bhh56TxYe

The use of __builtin_shufflevector is to extract the 8 low uint8_t elements
from a uint8x16_t into a uint8x8_t. It seems like due to the way the vector
extension is used to represent Wasm's SIMD128, we are lowering to a lot of
i8x16.extract_lane and i16x8.replace_lane.

Contrast it with native x86 codegen, which is a no-op (and it is, because it is
extracting the low 64-bits of a 128-bit vector into the low 64-bits).

-- 
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 50432] generating the "__floatunditf" for arm64 .

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50432

Eli Friedman  changed:

   What|Removed |Added

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

--- Comment #1 from Eli Friedman  ---
compiler-rt includes __floatunditf on aarch64.  Are you actually linking
against compiler-rt?

__aeabi_ul2d is not equivalent, and that generally only exists on 32-bit ARM,
anyway.

-- 
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 34536 in oss-fuzz: llvm:llvm-opt-fuzzer--x86_64-loop_unswitch: Null-dereference READ in BitcodeReader::parseFunctionBody

2021-05-21 Thread ClusterFuzz-External via monorail via llvm-bugs
Status: New
Owner: 
CC: k...@google.com, masc...@google.com, jdevl...@apple.com, igm...@gmail.com, 
d...@google.com, mit...@google.com, bigch...@gmail.com, eney...@google.com, 
llvm-...@lists.llvm.org, j...@chromium.org, v...@apple.com, 
mitch...@outlook.com, xpl...@gmail.com, akils...@apple.com 
Labels: ClusterFuzz Stability-Memory-AddressSanitizer Reproducible 
Engine-libfuzzer OS-Linux Proj-llvm Reported-2021-05-21
Type: Bug

New issue 34536 by ClusterFuzz-External: 
llvm:llvm-opt-fuzzer--x86_64-loop_unswitch: Null-dereference READ in 
BitcodeReader::parseFunctionBody
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34536

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

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

Crash Type: Null-dereference READ
Crash Address: 0x0010
Crash State:
  BitcodeReader::parseFunctionBody
  BitcodeReader::materialize
  BitcodeReader::materializeModule
  
Sanitizer: address (ASAN)

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

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

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 50437] New: Clang randomly segfault on one specific correct code with debug information flag

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50437

Bug ID: 50437
   Summary: Clang randomly segfault on one specific correct code
with debug information flag
   Product: new-bugs
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: fd...@uoregon.edu
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

Created attachment 24879
  --> https://bugs.llvm.org/attachment.cgi?id=24879&action=edit
source file

This line alternatively compiles or segfaults:

clang -v  -g -lm householder3.c
clang version 13.0.0
(/home/users/fdeny/llvm_build/llvmVersions/llvm13git/llvm-project/clang
ac06f6d06de408c00923708dd8a795b6ba9d23d7)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
InstalledDir:
/home/users/fdeny/llvm_build/llvmVersions/llvm13git/llvm-project/llvm/install/bin
Found candidate GCC installation: /usr/lib/gcc/ppc64le-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/ppc64le-redhat-linux/4.8.5
Selected GCC installation: /usr/lib/gcc/ppc64le-redhat-linux/4.8.5
Candidate multilib: .;@m64
Selected multilib: .;@m64
Found CUDA installation: /usr/local/cuda, version 10.1

"/storage/users/fdeny/llvm_build/llvmVersions/llvm13git/llvm-project/llvm/install/bin/clang-13"
-cc1 -triple powerpc64le-unknown-linux-gnu -emit-obj -mrelax-all
--mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names
-main-file-name householder3.c -mrelocation-model static -mframe-pointer=all
-fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables
-target-cpu ppc64le -mfloat-abi hard -target-abi elfv2 -debug-info-kind=limited
-dwarf-version=4 -debugger-tuning=gdb -v
-fcoverage-compilation-dir=/home/users/fdeny/testsuite/validation_tests/llvm/tau/householder3copy
-resource-dir
/storage/users/fdeny/llvm_build/llvmVersions/llvm13git/llvm-project/llvm/install/lib/clang/13.0.0
-c-isystem
/usr/local/packages/gcc/10.3.0/linux-rhel7-power9le/gcc-7.3.0/gcc-10.3.0-i3sgzx5m2hl43w5grpjjzwmr7egvtiwq/include
-cxx-isystem
/usr/local/packages/gcc/10.3.0/linux-rhel7-power9le/gcc-7.3.0/gcc-10.3.0-i3sgzx5m2hl43w5grpjjzwmr7egvtiwq/include
-internal-isystem
/storage/users/fdeny/llvm_build/llvmVersions/llvm13git/llvm-project/llvm/install/lib/clang/13.0.0/include/ppc_wrappers
-internal-isystem
/storage/users/fdeny/llvm_build/llvmVersions/llvm13git/llvm-project/llvm/install/lib/clang/13.0.0/include
-internal-isystem /usr/local/include -internal-isystem
/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../ppc64le-redhat-linux/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir=/home/users/fdeny/testsuite/validation_tests/llvm/tau/householder3copy
-ferror-limit 19 -fno-signed-char -fgnuc-version=4.2.1 -fcolor-diagnostics
-faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/householder3-c1a556.o -x c
householder3.c
clang -cc1 version 13.0.0 based upon LLVM 13.0.0git default target
powerpc64le-unknown-linux-gnu
ignoring nonexistent directory
"/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../ppc64le-redhat-linux/include"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:

/usr/local/packages/gcc/10.3.0/linux-rhel7-power9le/gcc-7.3.0/gcc-10.3.0-i3sgzx5m2hl43w5grpjjzwmr7egvtiwq/include

/storage/users/fdeny/llvm_build/llvmVersions/llvm13git/llvm-project/llvm/install/lib/clang/13.0.0/include/ppc_wrappers

/storage/users/fdeny/llvm_build/llvmVersions/llvm13git/llvm-project/llvm/install/lib/clang/13.0.0/include
 /usr/local/include
 /usr/include
End of search list.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.  Program arguments:
/storage/users/fdeny/llvm_build/llvmVersions/llvm13git/llvm-project/llvm/install/bin/clang-13
-cc1 -triple powerpc64le-unknown-linux-gnu -emit-obj -mrelax-all
--mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names
-main-file-name householder3.c -mrelocation-model static -mframe-pointer=all
-fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables
-target-cpu ppc64le -mfloat-abi hard -target-abi elfv2 -debug-info-kind=limited
-dwarf-version=4 -debugger-tuning=gdb -v
-fcoverage-compilation-dir=/home/users/fdeny/testsuite/validation_tests/llvm/tau/householder3copy
-resource-dir
/storage/users/fdeny/llvm_build/llvmVersions/llvm13git/llvm-project/llvm/install/lib/clang/13.0.0
-c-isystem
/usr/local/packages/gcc/10.3.0/linux-rhel7-power9le/gcc-7.3.0/gcc-10.3.0-i3sgzx5m2hl43w5grpjjzwmr7egvtiwq/include
-cxx-isystem
/usr/local/packages/gcc/10.3.0/linux-rhel7-power9le/gcc-7.3.0/gcc-10.3.0-i3sgzx5m2hl43w5grpjjzwmr7egvtiwq/include
-internal-isystem
/storage/users/fdeny/llvm_build/llvmVersions/llvm13git/llvm-project

[llvm-bugs] [Bug 50438] New: Warn when assigning to temporary

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50438

Bug ID: 50438
   Summary: Warn when assigning to temporary
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: C++
  Assignee: unassignedclangb...@nondot.org
  Reporter: davidfromonl...@gmail.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk

I would like for there to be a warning that warns for the following code:

```
struct s {};

inline void f() {
s() = s();
}
```

I know that for a given type, I can prevent this from compiling if I give `s`
an lvalue-refererence-qualified assignment operator, but that requires writing
two assignment operators and two (sometimes three) constructors to get the
behavior I get today from not typing anything, and I have to apply it to every
type. It would be much nicer if I could just turn on a warning for this.

I don't know where this warning would belong in terms of `Wall` `Wextra` or
just `Weverything`. The only valid use case is if your assignment operator has
a side effect that you want.

-- 
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 49068] x86-64 COFF driver doesn't relocate ADDR32 relocations correctly

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=49068

Axel Y. Rivera  changed:

   What|Removed |Added

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

--- Comment #5 from Axel Y. Rivera  ---
Issue was solved in https://reviews.llvm.org/D96619

-- 
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 50439] New: Assertion failure when reducing a program

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50439

Bug ID: 50439
   Summary: Assertion failure when reducing a program
   Product: tools
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: llvm-reduce
  Assignee: unassignedb...@nondot.org
  Reporter: langs...@galois.com
CC: dblai...@gmail.com, llvm-bugs@lists.llvm.org

I encountered this assertion failure when reducing a file with llvm-reduce.
Unfortunately, this only occurs after several reductions and I can't share the
script that decides the "interestingness" of program. I thought I'd still go
ahead and post this since the error message asked me to.

llvm-reduce: /x/llvm-project/llvm/include/llvm/IR/InstrTypes.h:1342:
llvm::Value *llvm::CallBase::getArgOperand(unsigned int) const: Assertion `i <
getNumArgOperands() && "Out of bounds!"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.  Program arguments: /x/llvm-reduce --test=././reduce.py
/x/testcases/reduced.bc
#0 0x00905eda llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
/x/llvm-project/llvm/lib/Support/Unix/Signals.inc:565:11
#1 0x009060ab PrintStackTraceSignalHandler(void*)
/x/llvm-project/llvm/lib/Support/Unix/Signals.inc:632:1
#2 0x0090467b llvm::sys::RunSignalHandlers()
/x/llvm-project/llvm/lib/Support/Signals.cpp:75:5
#3 0x00906821 SignalHandler(int)
/x/llvm-project/llvm/lib/Support/Unix/Signals.inc:407:1
#4 0x7f751937c3c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
#5 0x7f7518e1118b raise
/build/glibc-eX1tMB/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#6 0x7f7518df0859 abort
/build/glibc-eX1tMB/glibc-2.31/stdlib/abort.c:81:7
#7 0x7f7518df0729 get_sysdep_segment_value
/build/glibc-eX1tMB/glibc-2.31/intl/loadmsgcat.c:509:8
#8 0x7f7518df0729 _nl_load_domain
/build/glibc-eX1tMB/glibc-2.31/intl/loadmsgcat.c:970:34
#9 0x7f7518e01f36 (/lib/x86_64-linux-gnu/libc.so.6+0x36f36)
#10 0x0049a053 llvm::CallBase::getArgOperand(unsigned int) const
/x/llvm-project/llvm/include/llvm/IR/InstrTypes.h:1343:23
#11 0x005e572d llvm::DbgVariableIntrinsic::getRawVariable() const
/x/llvm-project/llvm/include/llvm/IR/IntrinsicInst.h:261:12
#12 0x005e4325 llvm::DbgVariableIntrinsic::getVariable() const
/x/llvm-project/llvm/include/llvm/IR/IntrinsicInst.h:249:12
#13 0x007165c5 llvm::DebugInfoFinder::processVariable(llvm::Module
const&, llvm::DbgVariableIntrinsic const&)
/x/llvm-project/llvm/lib/IR/DebugInfo.cpp:283:13
#14 0x007160a5
llvm::DebugInfoFinder::processInstruction(llvm::Module const&,
llvm::Instruction const&) /x/llvm-project/llvm/lib/IR/DebugInfo.cpp:197:21
#15 0x009453fc llvm::CloneBasicBlock(llvm::BasicBlock const*,
llvm::ValueMap > >&,
llvm::Twine const&, llvm::Function*, llvm::ClonedCodeInfo*,
llvm::DebugInfoFinder*)
/x/llvm-project/llvm/lib/Transforms/Utils/CloneFunction.cpp:60:28
#16 0x00945d90 llvm::CloneFunctionInto(llvm::Function*,
llvm::Function const*, llvm::ValueMap > >&,
llvm::CloneFunctionChangeType, llvm::SmallVectorImpl&, char
const*, llvm::ClonedCodeInfo*, llvm::ValueMapTypeRemapper*,
llvm::ValueMaterializer*)
/x/llvm-project/llvm/lib/Transforms/Utils/CloneFunction.cpp:174:17
#17 0x009469b4 llvm::CloneFunction(llvm::Function*,
llvm::ValueMap > >&,
llvm::ClonedCodeInfo*)
/x/llvm-project/llvm/lib/Transforms/Utils/CloneFunction.cpp:316:10
#18 0x00422019 extractArgumentsFromModule(std::vector >, llvm::Module*)
/x/llvm-project/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp:89:11
#19 0x0042d39f std::_Function_handler > const&, llvm::Module*),
void (*)(std::vector >,
llvm::Module*)>::_M_invoke(std::_Any_data const&, std::vector > const&, llvm::Module*&&)
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_function.h:300:2
#20 0x0041ae30 std::function > const&,
llvm::Module*)>::operator()(std::vector > const&, llvm::Module*) const
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_function.h:688:7
#21 0x004197f0 llvm::runDeltaPass(llvm::TestRunner&, int,
std::function >
const&, llvm::Module*)>)
/x/llvm-project/llvm/tools/llvm-reduce/deltas/Delta.cpp:148:31
#22 0x0042173c llvm::reduceArgumentsDeltaPass(llvm::TestRunner&)
/x/llvm-project/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp:125:3
#23 0x004111a6 runAllDeltaPasses(llvm::TestRunner&)
/x/llvm-project/llvm/tools/llvm-reduce/DeltaManager.cpp:58:3
#24 0x00411097 llvm::runDeltaPasses(llvm::TestRunner&)
/x/llvm-project/llvm/tools/llvm-reduce/DeltaManager.cpp:84:3
#25 0x00458635 main
/x/llvm-project/llvm/tools/llvm-reduce/llvm-reduce.cpp:126:1

[llvm-bugs] [Bug 50440] New: "StepValue is not an integer" assertion failed with x86_64 allmodconfig Linux kernel

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50440

Bug ID: 50440
   Summary: "StepValue is not an integer" assertion failed with
x86_64 allmodconfig Linux kernel
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Loop Optimizer
  Assignee: unassignedb...@nondot.org
  Reporter: natechancel...@gmail.com
CC: llvm-bugs@lists.llvm.org

Created attachment 24881
  --> https://bugs.llvm.org/attachment.cgi?id=24881&action=edit
Reduced fs/gfs2/rgrp.c

After Profile Guided Optimization support was added to the Linux kernel [1],
there is a crash in fs/gfs2/rgrp.o:

$ make -skj"$(nproc)" LLVM=1 LLVM_IAS=1 O=build/x86_64 distclean allmodconfig
fs/gfs2/rgrp.o
clang:
/home/nathan/cbl/github/tc-build/llvm-project/llvm/lib/Analysis/IVDescriptors.cpp:959:
llvm::InductionDescriptor::InductionDescriptor(llvm::Value *,
llvm::InductionDescriptor::InductionKind, const llvm::SCEV *,
llvm::BinaryOperator *, SmallVectorImpl *): Assertion `(IK
== IK_FpInduction || Step->getType()->isIntegerTy()) && "StepValue is not an
integer"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.  Program arguments:
/home/nathan/cbl/github/tc-build/build/llvm/stage1/bin/clang -Qunused-arguments
-fmacro-prefix-map=/home/nathan/cbl/src/linux-next/= -Wall -Wundef
-Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-fshort-wchar -fno-PIE -Werror=implicit-function-declaration
-Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89
-Werror=unknown-warning-option -integrated-as -mno-sse -mno-mmx -mno-sse2
-mno-3dnow -mno-avx -fcf-protection=none -m64 -mno-80387 -mstack-alignment=8
-mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare
-fno-asynchronous-unwind-tables -mretpoline-external-thunk
-fno-delete-null-pointer-checks -Wno-frame-address
-Wno-address-of-packed-member -O2 -Wframe-larger-than=2048
-fstack-protector-strong -Wno-format-invalid-specifier -Wno-gnu
-mno-global-merge -Wno-unused-const-variable -ftrivial-auto-var-init=pattern
-fno-stack-clash-protection -pg -mfentry -falign-functions=64
-Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-array-bounds
-fno-strict-overflow -fno-stack-check -Werror=date-time
-Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-format
-Wno-sign-compare -Wno-format-zero-length -Wno-pointer-to-enum-cast
-Wno-tautological-constant-out-of-range-compare -fprofile-generate
-fsanitize=kernel-address -mllvm -asan-mapping-offset=0xdc00 -mllvm
-asan-globals=1 -mllvm -asan-instrumentation-with-call-threshold=0 -mllvm
-asan-stack=0 --param asan-instrument-allocas=1 -fsanitize=array-bounds
-fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=object-size
-fsanitize=bool -fsanitize=enum -fsanitize-coverage=trace-pc
-fsanitize-coverage=trace-cmp -nostdinc -isystem
/home/nathan/cbl/github/tc-build/build/llvm/stage1/lib/clang/13.0.0/include
-I/home/nathan/cbl/src/linux-next/arch/x86/include
-I./arch/x86/include/generated -I/home/nathan/cbl/src/linux-next/include
-I./include -I/home/nathan/cbl/src/linux-next/arch/x86/include/uapi
-I./arch/x86/include/generated/uapi
-I/home/nathan/cbl/src/linux-next/include/uapi -I./include/generated/uapi
-include /home/nathan/cbl/src/linux-next/include/linux/compiler-version.h
-include /home/nathan/cbl/src/linux-next/include/linux/kconfig.h -include
/home/nathan/cbl/src/linux-next/include/linux/compiler_types.h -D__KERNEL__
-DCONFIG_X86_X32_ABI -DCC_USING_NOP_MCOUNT -DCC_USING_FENTRY -Ifs/gfs2 -I
/home/nathan/cbl/src/linux-next/fs/gfs2 -I ./fs/gfs2 -DMODULE
-DKBUILD_BASENAME=\"rgrp\" -DKBUILD_MODNAME=\"gfs2\"
-D__KBUILD_MODNAME=kmod_gfs2 -c -Wp,-MMD,fs/gfs2/.rgrp.o.d -fcolor-diagnostics
-o fs/gfs2/rgrp.o /home/nathan/cbl/src/linux-next/fs/gfs2/rgrp.c
1.   parser at end of file
2.  Code generation
3.  Running pass 'Function Pass Manager' on module
'/home/nathan/cbl/src/linux-next/fs/gfs2/rgrp.c'.
4.  Running pass 'Loop Pass Manager' on function '@gfs2_rgrp_verify'
5.  Running pass 'Canonicalize Freeze Instructions in Loops' on basic block
'%cont21'
 #0 0x02a0e883 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/home/nathan/cbl/github/tc-build/build/llvm/stage1/bin/clang+0x2a0e883)
 #1 0x02a0c6ee llvm::sys::RunSignalHandlers()
(/home/nathan/cbl/github/tc-build/build/llvm/stage1/bin/clang+0x2a0c6ee)
 #2 0x029995a3 (anonymous
namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long)
CrashRecoveryContext.cpp:0:0
 #3 0x029996de CrashRecoverySignalHandler(int)
CrashRecoveryContext.cpp:0:0
 #4 0x7f012020c870 __restore_rt sigaction.c:0:0
 #5 0x7f011fcc6d22 raise (/usr/lib/libc.so.6+0x3cd22)
 #6 0x7f011fcb0862 abort (

[llvm-bugs] [Bug 50441] New: clang crashes on valid code at -O1 and above when enabling -g on x86_64-linux-gnu: Assertion `getParent() && "Not embedded in a basic block!"' failed

2021-05-21 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50441

Bug ID: 50441
   Summary: clang crashes on valid code at -O1 and above when
enabling -g on x86_64-linux-gnu: Assertion
`getParent() && "Not embedded in a basic block!"'
failed
   Product: libraries
   Version: trunk
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Common Code Generator Code
  Assignee: unassignedb...@nondot.org
  Reporter: zhendong...@inf.ethz.ch
CC: llvm-bugs@lists.llvm.org

[523] % clangtk -v
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
86008477a4eb9ecac27f469539c4ac5e0fce44dc)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/suz-local/opfuzz/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
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.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
[524] % 
[524] % clangtk -O1 -c small.c
[525] % 
[525] % clangtk -O1 -g -c small.c
clangtk:
/local/suz-local/software/clangbuild/llvm-project/llvm/lib/CodeGen/MachineInstr.cpp:678:
void llvm::MachineInstr::eraseFromParent(): Assertion `getParent() && "Not
embedded in a basic block!"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.  Program arguments: clangtk -O1 -g -c small.c
1.   parser at end of file
2.  Code generation
3.  Running pass 'Function Pass Manager' on module 'small.c'.
4.  Running pass 'Early Tail Duplication' on function '@main'
 #0 0x556c746901bc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x37531bc)
 #1 0x556c7468e074 llvm::sys::RunSignalHandlers()
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x3751074)
 #2 0x556c7468e2f5 llvm::sys::CleanupOnSignal(unsigned long)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x37512f5)
 #3 0x556c745e8ac8 CrashRecoverySignalHandler(int)
CrashRecoveryContext.cpp:0:0
 #4 0x7f051b8e6980 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
 #5 0x7f051a597fb7 raise
/build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #6 0x7f051a599921 abort /build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81:0
 #7 0x7f051a58948a __assert_fail_base
/build/glibc-S9d2JN/glibc-2.27/assert/assert.c:89:0
 #8 0x7f051a589502 (/lib/x86_64-linux-gnu/libc.so.6+0x30502)
 #9 0x556c73a16f4a
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x2ad9f4a)
#10 0x556c73bddfd5 llvm::TailDuplicator::tailDuplicateAndUpdate(bool,
llvm::MachineBasicBlock*, llvm::MachineBasicBlock*,
llvm::SmallVectorImpl*, llvm::function_ref*, llvm::SmallVectorImpl*)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x2ca0fd5)
#11 0x556c73bde807 llvm::TailDuplicator::tailDuplicateBlocks()
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x2ca1807)
#12 0x556c73bd463a (anonymous
namespace)::TailDuplicateBase::runOnMachineFunction(llvm::MachineFunction&)
TailDuplication.cpp:0:0
#13 0x556c73a0fe36
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x2ad2e36)
#14 0x556c73e87648 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x2f4a648)
#15 0x556c73e88179 llvm::FPPassManager::runOnModule(llvm::Module&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x2f4b179)
#16 0x556c73e86ec6 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x2f49ec6)
#17 0x556c74966585 (anonymous
namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction,
std::unique_ptr >) BackendUtil.cpp:0:0
#18 0x556c74969dd3 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef,
llvm::Module*, clang::BackendAction, std::unique_ptr >)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x3a2cdd3)
#19 0x556c756012ea
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x46c42ea)
#20 0x556c76463eb9 clang::ParseAST(clang::Sema&, bool, bool)
(/local/suz-local/softwa