[llvm-bugs] Issue 13486 in oss-fuzz: llvm/llvm-isel-fuzzer--x86_64-O2: Direct-leak in BitcodeReader::parseConstants

2019-03-02 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  
Stability-Memory-LeakSanitizer Engine-libfuzzer Proj-llvm  
Reported-2019-03-02

Type: Bug

New issue 13486 by ClusterFuzz-External: llvm/llvm-isel-fuzzer--x86_64-O2:  
Direct-leak in BitcodeReader::parseConstants

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

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

Project: llvm
Fuzzer: libFuzzer_llvm_llvm-isel-fuzzer--x86_64-O2
Fuzz target binary: llvm-isel-fuzzer--x86_64-O2
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Direct-leak
Crash Address:
Crash State:
  BitcodeReader::parseConstants
  BitcodeReader::parseModule
  llvm::BitcodeModule::getModuleImpl

Sanitizer: address (ASAN)

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


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


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 40930] New: opt crashes with "opt -consthoist"

2019-03-02 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40930

Bug ID: 40930
   Summary: opt crashes with "opt -consthoist"
   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 21543
  --> https://bugs.llvm.org/attachment.cgi?id=21543&action=edit
.bc file of the source code

$clang -v
clang version 9.0.0 (trunk 354742)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm/build/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

$opt -consthoist small.bc -o small-opt.bc
Stack dump:
0.  Program arguments:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/build2/bin/opt -consthoist
small.bc -o small-opt.bc 
1.  Running pass 'Function Pass Manager' on module 'small.bc'.
2.  Running pass 'Constant Hoisting' on function '@b'
 #0 0x55be5f336b7b llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:494:0
 #1 0x55be5f336c0e PrintStackTraceSignalHandler(void*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:558:0
 #2 0x55be5f334b92 llvm::sys::RunSignalHandlers()
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Signals.cpp:68:0
 #3 0x55be5f33659d SignalHandler(int)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:357:0
 #4 0x7f73df201890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #5 0x55be5ea2dda2 llvm::DomTreeNodeBase::getIDom() const
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/include/llvm/Support/GenericDomTree.h:82:0
 #6 0x55be5efa8a5e findBestInsertionSet(llvm::DominatorTree&,
llvm::BlockFrequencyInfo&, llvm::BasicBlock*,
llvm::SmallPtrSet&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:225:0
 #7 0x55be5efa9400
llvm::ConstantHoistingPass::findConstantInsertionPoint(llvm::consthoist::ConstantInfo
const&) const
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:319:0
 #8 0x55be5efabf1e
llvm::ConstantHoistingPass::emitBaseConstants(llvm::GlobalVariable*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:826:0
 #9 0x55be5efaca17 llvm::ConstantHoistingPass::runImpl(llvm::Function&,
llvm::TargetTransformInfo&, llvm::DominatorTree&, llvm::BlockFrequencyInfo*,
llvm::BasicBlock&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:941:0
#10 0x55be5efa85b7 (anonymous
namespace)::ConstantHoistingLegacyPass::runOnFunction(llvm::Function&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:153:0
#11 0x55be5eab71fc llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1643:0
#12 0x55be5eab7473 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1678:0
#13 0x55be5eab7844 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1743:0
#14 0x55be5eab7fd3 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1856:0
#15 0x55be5eab81c5 llvm::legacy::PassManager::run(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1888:0
#16 0x55be5cd1515f main
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/tools/opt/opt.cpp:862:0
#17 0x7f73dde96b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#18 0x55be5ccd6cba _start
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm/build2/bin/opt+0x1808cba)
Segmentation fault (core dumped)

The following is the source code of small.c, which is generated by csmith 2.4.0
and reduced by creduce 2.9.0 (eca4f38).

#in

[llvm-bugs] [Bug 40931] New: opt crashes with "opt -jump-threading -consthoist"

2019-03-02 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40931

Bug ID: 40931
   Summary: opt crashes with "opt -jump-threading -consthoist"
   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 21544
  --> https://bugs.llvm.org/attachment.cgi?id=21544&action=edit
.bc file of the source code

$clang -v
clang version 9.0.0 (trunk 354742)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm/build/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

$opt -jump-threading -consthoist small.bc -o small-opt.bc
Stack dump:
0.  Program arguments:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/build2/bin/opt -jump-threading
-consthoist small.bc -o small-opt.bc 
1.  Running pass 'Function Pass Manager' on module 'small.bc'.
2.  Running pass 'Constant Hoisting' on function '@a'
 #0 0x564539681b7b llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:494:0
 #1 0x564539681c0e PrintStackTraceSignalHandler(void*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:558:0
 #2 0x56453967fb92 llvm::sys::RunSignalHandlers()
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Signals.cpp:68:0
 #3 0x56453968159d SignalHandler(int)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:357:0
 #4 0x7f33df8b5890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #5 0x564538d78da2 llvm::DomTreeNodeBase::getIDom() const
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/include/llvm/Support/GenericDomTree.h:82:0
 #6 0x5645392f3a5e findBestInsertionSet(llvm::DominatorTree&,
llvm::BlockFrequencyInfo&, llvm::BasicBlock*,
llvm::SmallPtrSet&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:225:0
 #7 0x5645392f4400
llvm::ConstantHoistingPass::findConstantInsertionPoint(llvm::consthoist::ConstantInfo
const&) const
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:319:0
 #8 0x5645392f6f1e
llvm::ConstantHoistingPass::emitBaseConstants(llvm::GlobalVariable*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:826:0
 #9 0x5645392f7a17 llvm::ConstantHoistingPass::runImpl(llvm::Function&,
llvm::TargetTransformInfo&, llvm::DominatorTree&, llvm::BlockFrequencyInfo*,
llvm::BasicBlock&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:941:0
#10 0x5645392f35b7 (anonymous
namespace)::ConstantHoistingLegacyPass::runOnFunction(llvm::Function&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:153:0
#11 0x564538e021fc llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1643:0
#12 0x564538e02473 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1678:0
#13 0x564538e02844 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1743:0
#14 0x564538e02fd3 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1856:0
#15 0x564538e031c5 llvm::legacy::PassManager::run(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1888:0
#16 0x56453706015f main
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/tools/opt/opt.cpp:862:0
#17 0x7f33de54ab97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#18 0x564537021cba _start
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm/build2/bin/opt+0x1808cba)
Segmentation fault (core dumped)

The following is the source code of small.c, which is generated by csmith 2.

[llvm-bugs] [Bug 40932] New: opt crashes with "opt -inline -consthoist"

2019-03-02 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40932

Bug ID: 40932
   Summary: opt crashes with "opt -inline -consthoist"
   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 21545
  --> https://bugs.llvm.org/attachment.cgi?id=21545&action=edit
.bc file of the source code

$clang -v
clang version 9.0.0 (trunk 354742)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm/build/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

$opt -inline -consthoist small.bc -o small-opt.bc
Stack dump:
0.  Program arguments:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/build2/bin/opt -inline
-consthoist small.bc -o small-opt.bc 
1.  Running pass 'CallGraph Pass Manager' on module 'small.bc'.
2.  Running pass 'Constant Hoisting' on function '@d'
 #0 0x55abb4f99b7b llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:494:0
 #1 0x55abb4f99c0e PrintStackTraceSignalHandler(void*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:558:0
 #2 0x55abb4f97b92 llvm::sys::RunSignalHandlers()
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Signals.cpp:68:0
 #3 0x55abb4f9959d SignalHandler(int)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:357:0
 #4 0x7fa341a2d890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #5 0x55abb4690da2 llvm::DomTreeNodeBase::getIDom() const
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/include/llvm/Support/GenericDomTree.h:82:0
 #6 0x55abb4c0ba5e findBestInsertionSet(llvm::DominatorTree&,
llvm::BlockFrequencyInfo&, llvm::BasicBlock*,
llvm::SmallPtrSet&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:225:0
 #7 0x55abb4c0c400
llvm::ConstantHoistingPass::findConstantInsertionPoint(llvm::consthoist::ConstantInfo
const&) const
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:319:0
 #8 0x55abb4c0ef1e
llvm::ConstantHoistingPass::emitBaseConstants(llvm::GlobalVariable*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:826:0
 #9 0x55abb4c0fa17 llvm::ConstantHoistingPass::runImpl(llvm::Function&,
llvm::TargetTransformInfo&, llvm::DominatorTree&, llvm::BlockFrequencyInfo*,
llvm::BasicBlock&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:941:0
#10 0x55abb4c0b5b7 (anonymous
namespace)::ConstantHoistingLegacyPass::runOnFunction(llvm::Function&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:153:0
#11 0x55abb471a1fc llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1643:0
#12 0x55abb3db9e33 (anonymous
namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&,
llvm::CallGraph&, bool&, bool&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Analysis/CallGraphSCCPass.cpp:177:0
#13 0x55abb3dbae4d (anonymous
namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&,
llvm::CallGraph&, bool&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Analysis/CallGraphSCCPass.cpp:441:0
#14 0x55abb3dbb19a (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Analysis/CallGraphSCCPass.cpp:497:0
#15 0x55abb471a844 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1743:0
#16 0x55abb471afd3 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1856:0
#17 0x55abb471b1c5 llvm::legacy::PassManager::run(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyP

[llvm-bugs] [Bug 40933] New: opt crashes with "opt -mem2reg -inline -early-cse-memssa -flattencfg"

2019-03-02 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40933

Bug ID: 40933
   Summary: opt crashes with "opt -mem2reg -inline
-early-cse-memssa -flattencfg"
   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 21546
  --> https://bugs.llvm.org/attachment.cgi?id=21546&action=edit
.bc file of the source code

$clang -v
clang version 9.0.0 (trunk 354742)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm/build/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

$opt -mem2reg -inline -early-cse-memssa -flattencfg  small.bc -o small-opt.bc
opt:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/include/llvm/Support/Casting.h:105:
static bool llvm::isa_impl_cl::doit(const From*) [with To =
llvm::BranchInst; From = llvm::Instruction]: Assertion `Val && "isa<> used on a
null pointer"' failed.
Stack dump:
0.  Program arguments:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/build2/bin/opt -mem2reg -inline
-early-cse-memssa -flattencfg small.bc -o small-opt.bc 
1.  Running pass 'CallGraph Pass Manager' on module 'small.bc'.
2.  Running pass 'Flatten the CFG' on function '@a'
 #0 0x55a3eaa2db7b llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:494:0
 #1 0x55a3eaa2dc0e PrintStackTraceSignalHandler(void*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:558:0
 #2 0x55a3eaa2bb92 llvm::sys::RunSignalHandlers()
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Signals.cpp:68:0
 #3 0x55a3eaa2d59d SignalHandler(int)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:357:0
 #4 0x7f190f406890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #5 0x7f190e0b8e97 gsignal
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #6 0x7f190e0ba801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #7 0x7f190e0aa39a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
 #8 0x7f190e0aa412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
 #9 0x55a3e85daf98 llvm::isa_impl_cl::doit(llvm::Instruction const*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/include/llvm/Support/Casting.h:106:0
#10 0x55a3e85da902 llvm::isa_impl_wrap::doit(llvm::Instruction const* const&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/include/llvm/Support/Casting.h:133:0
#11 0x55a3e87b18e0 llvm::isa_impl_wrap::doit(llvm::Instruction* const&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/include/llvm/Support/Casting.h:125:0
#12 0x55a3e87b161f bool llvm::isa(llvm::Instruction* const&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/include/llvm/Support/Casting.h:144:0
#13 0x55a3e87b0f8e llvm::cast_retty::ret_type llvm::dyn_cast(llvm::Instruction*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/include/llvm/Support/Casting.h:333:0
#14 0x55a3eaa4c3a9 llvm::GetIfCondition(llvm::BasicBlock*,
llvm::BasicBlock*&, llvm::BasicBlock*&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp:826:0
#15 0x55a3eaa7a6b0 (anonymous
namespace)::FlattenCFGOpt::MergeIfRegion(llvm::BasicBlock*,
llvm::IRBuilder&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Utils/FlattenCFG.cpp:400:0
#16 0x55a3eaa7abf1 (anonymous
namespace)::FlattenCFGOpt::run(llvm::BasicBlock*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Utils/FlattenCFG.cpp:481:0
#17 0x55a3eaa7ac7f llvm::FlattenCFG(llvm::BasicBlock*, llvm::AAResults*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Utils/FlattenCFG.cpp:491:0
#18 0x55a3ea6d8b6b iterativelyFlattenCFG(llvm::Function&, llvm::AAResults*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp:61:0
#19 0x55a3ea6d8be6 (anonymous
namespace)::FlattenCFGPass::runOnFunction

[llvm-bugs] [Bug 40934] New: opt crashes with "opt -mem2reg -jump-threading -consthoist"

2019-03-02 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40934

Bug ID: 40934
   Summary: opt crashes with "opt -mem2reg -jump-threading
-consthoist"
   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 21547
  --> https://bugs.llvm.org/attachment.cgi?id=21547&action=edit
.bc file of the source code

$clang -v
clang version 9.0.0 (trunk 354742)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm/build/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

$opt -mem2reg -jump-threading -consthoist  small.bc -o small-opt.bc
Stack dump:
0.  Program arguments:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/build2/bin/opt -mem2reg
-jump-threading -consthoist small.bc -o small-opt.bc 
1.  Running pass 'Function Pass Manager' on module 'small.bc'.
2.  Running pass 'Constant Hoisting' on function '@a'
 #0 0x561f1d925b7b llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:494:0
 #1 0x561f1d925c0e PrintStackTraceSignalHandler(void*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:558:0
 #2 0x561f1d923b92 llvm::sys::RunSignalHandlers()
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Signals.cpp:68:0
 #3 0x561f1d92559d SignalHandler(int)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:357:0
 #4 0x7f04bdb89890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #5 0x561f1d01cda2 llvm::DomTreeNodeBase::getIDom() const
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/include/llvm/Support/GenericDomTree.h:82:0
 #6 0x561f1d597a5e findBestInsertionSet(llvm::DominatorTree&,
llvm::BlockFrequencyInfo&, llvm::BasicBlock*,
llvm::SmallPtrSet&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:225:0
 #7 0x561f1d598400
llvm::ConstantHoistingPass::findConstantInsertionPoint(llvm::consthoist::ConstantInfo
const&) const
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:319:0
 #8 0x561f1d59af1e
llvm::ConstantHoistingPass::emitBaseConstants(llvm::GlobalVariable*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:826:0
 #9 0x561f1d59ba17 llvm::ConstantHoistingPass::runImpl(llvm::Function&,
llvm::TargetTransformInfo&, llvm::DominatorTree&, llvm::BlockFrequencyInfo*,
llvm::BasicBlock&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:941:0
#10 0x561f1d5975b7 (anonymous
namespace)::ConstantHoistingLegacyPass::runOnFunction(llvm::Function&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:153:0
#11 0x561f1d0a61fc llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1643:0
#12 0x561f1d0a6473 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1678:0
#13 0x561f1d0a6844 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1743:0
#14 0x561f1d0a6fd3 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1856:0
#15 0x561f1d0a71c5 llvm::legacy::PassManager::run(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1888:0
#16 0x561f1b30415f main
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/tools/opt/opt.cpp:862:0
#17 0x7f04bc81eb97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#18 0x561f1b2c5cba _start
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm/build2/bin/opt+0x1808cba)
Segmentation fault (core dumped)

The following is the source 

[llvm-bugs] Issue 10250 in oss-fuzz: llvm: Build failure

2019-03-02 Thread ClusterFuzz-External via monorail via llvm-bugs


Comment #43 on issue 10250 by ClusterFuzz-External: llvm: Build failure
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10250#c43

Friendly reminder that the the build is still failing.
Please try to fix this failure to ensure that fuzzing remains productive.
Latest build log:  
https://oss-fuzz-build-logs.storage.googleapis.com/log-31e8759a-ca8f-46bf-97cb-97957639dcac.txt


--
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 13245 in oss-fuzz: llvm/llvm-opt-fuzzer--x86_64-loop_unroll: ASSERT: (isa(ExactNotTaken) || !isa(MaxNotTake

2019-03-02 Thread ClusterFuzz-External via monorail via llvm-bugs


Comment #2 on issue 13245 by ClusterFuzz-External:  
llvm/llvm-opt-fuzzer--x86_64-loop_unroll: ASSERT:  
(isa(ExactNotTaken) | 
| !isa(MaxNotTake

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

ClusterFuzz has detected this issue as fixed in range  
201903010424:201903020420.


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

Project: llvm
Fuzzer: libFuzzer_llvm_llvm-opt-fuzzer--x86_64-loop_unroll
Fuzz target binary: llvm-opt-fuzzer--x86_64-loop_unroll
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: ASSERT
Crash Address:
Crash State:
  (isa(ExactNotTaken) | 
| !isa(MaxNotTake

  llvm::ScalarEvolution::ExitLimit::ExitLimit
  llvm::ScalarEvolution::computeExitLimitFromCondImpl

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201802210603:201802211531
Fixed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201903010424:201903020420


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


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 13245 in oss-fuzz: llvm/llvm-opt-fuzzer--x86_64-loop_unroll: ASSERT: (isa(ExactNotTaken) || !isa(MaxNotTake

2019-03-02 Thread ClusterFuzz-External via monorail via llvm-bugs

Updates:
Labels: ClusterFuzz-Verified
Status: Verified

Comment #3 on issue 13245 by ClusterFuzz-External:  
llvm/llvm-opt-fuzzer--x86_64-loop_unroll: ASSERT:  
(isa(ExactNotTaken) | 
| !isa(MaxNotTake

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

ClusterFuzz testcase 5769626057703424 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] [Bug 40901] Clang-Format OFF/ON not respected when using C Style comments

2019-03-02 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40901

MyDeveloperDay  changed:

   What|Removed |Added

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

--- Comment #4 from MyDeveloperDay  ---

fixed by r355266

-- 
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 40935] New: omp declare target global variable bug

2019-03-02 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40935

Bug ID: 40935
   Summary: omp declare target global variable bug
   Product: OpenMP
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: Clang Compiler Support
  Assignee: unassignedclangb...@nondot.org
  Reporter: csda...@lbl.gov
CC: llvm-bugs@lists.llvm.org

Hello all,

There are problems when using a globally-scoped device array which has an "omp
declare target" around the array declaration.

Please see the test problem shown below. The host and device arrays should sum
to 10. The device array sums to 0 when using the LLVM/Clang compiler on a
system with Intel Skylake CPUs and NVIDIA Volta GPUs. I am using the master
branch of a version of LLVM/Clang from 20 Feb 2019.

$ clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda main.c -o main && srun -n
1 ./main
host=10, device=0 - FAILURE

$ more base.h main.c
::
base.h
::
#include 

#define SZ 10
#pragma omp declare target
extern int data[SZ];
#pragma omp end declare target

void check_data(void);
::
main.c
::
#include "base.h"
#pragma omp declare target
int data[SZ];
#pragma omp end declare target

int main()
{
  int i;
  for (i=0; i___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 40402] using optimizations yields different output

2019-03-02 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40402

Orr Dvory  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|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 40402] using optimizations yields different output

2019-03-02 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40402

Tim Northover  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |INVALID

--- Comment #6 from Tim Northover  ---
Unfortunately there are more problems in the source. I probably should have
read it more thoroughly the first time but I just ran -fsanitize=undefined over
it.

This time the issue is that all objects in C and C++ can only have one type,
and must always be used as that type (or "char *", known as the "omnipotent
char"). It's not valid to access a single object through both a "uint64_t *" to
a "uint16_t *" for example.

If you need to do that kind of thing in C, the recommended solution is to
memcpy from one object to another with the desired type. The compiler is very
good at spotting that idiom and will generally turn it into the optimal code.
In C++20 there's going to be a "bit_cast" function to make it less
clunky.

Alternatively (and this is how I verified it was the issue) both Clang and GCC
support a "-fno-strict-aliasing" option which essentially switches to a dialect
of the language without that rule.

Also, your initial malloc is wonky. -fsanitize=address points out that your
alignment step moves past the end of the object. This isn't what's causing the
problem though, just thought I'd point it out.

I'll close it again for now.

-- 
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 40936] New: [amdgpu][regression][bisected] function calls on Raven break sub int loads from private or local memory

2019-03-02 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40936

Bug ID: 40936
   Summary: [amdgpu][regression][bisected] function calls on Raven
break sub int loads from private or local memory
   Product: new-bugs
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: jv...@scarletmail.rutgers.edu
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

Created attachment 21549
  --> https://bugs.llvm.org/attachment.cgi?id=21549&action=edit
bad.asm

Bisected to:
df3568d8a9367a51c0368d47392f1bbb1b667603 is the first bad commit
commit df3568d8a9367a51c0368d47392f1bbb1b667603
Author: Matt Arsenault 
Date:   Thu Feb 28 00:40:32 2019 +

AMDGPU: Enable function calls by default

Fixes some crashes on illegal call situations which are unfortunately
still valid IR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355051
91177308-0d34-0410-b5e6-96231b3b80d8

The above commit regresses the following piglit tests:
vload-half-private.cl
vload-half-local.cl
vload-short-private.cl
vload-short-local.cl
vload-ushort-private.cl[0]
vload-ushort-local.cl

Note that the regression happens only on Raven (at least carrizo/iceland is
OK),
and only vec2 tests are affected.
I've verified to switching the options off on
954735141519398580615e0907a85ed0972b50cb
Fixes the issue.

[0]
https://jvesely.github.io/piglit/raven-latest-5/raven_19_02_28/program@execute@vl...@vload-ushort-private.html

GCN assembly code of both the good and the bad case is attached

-- 
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 13499 in oss-fuzz: llvm/clang-fuzzer: Stack-overflow in llvm::StringMapImpl::LookupBucketFor

2019-03-02 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-03-03

Type: Bug

New issue 13499 by ClusterFuzz-External: llvm/clang-fuzzer: Stack-overflow  
in llvm::StringMapImpl::LookupBucketFor

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

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

Project: llvm
Fuzzer: libFuzzer_llvm_clang-fuzzer
Fuzz target binary: clang-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Stack-overflow
Crash Address: 0x7ffd21cf1f28
Crash State:
  llvm::StringMapImpl::LookupBucketFor
  std::__1::pair, bool>  
llvm::Stri

  clang::Preprocessor::LookUpIdentifierInfo

Sanitizer: address (ASAN)

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


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 40937] New: opt cannot terminate with "opt -instcombine -structurizecfg -loop-extract -loop-rotate -newgvn -loop-versioning -loop-extract"

2019-03-02 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40937

Bug ID: 40937
   Summary: opt cannot terminate with "opt -instcombine
-structurizecfg -loop-extract -loop-rotate -newgvn
-loop-versioning -loop-extract"
   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 21553
  --> https://bugs.llvm.org/attachment.cgi?id=21553&action=edit
.bc file of the source code

For this test case, opt cannot terminate. I have tested it using godbolt, and
the opt 6/7/truck versions all have this problem. The outputs of opt 6/7/truck
are as follows.

opt truck:
/compiler-explorer/c-preload/compiler-wrapper: line 21: 20300 Killed   
  "$@"

Compiler returned: 137

opt 7:
/compiler-explorer/c-preload/compiler-wrapper: line 21: 20621 Killed   
  "$@"

Compiler returned: 137

opt 6:
/compiler-explorer/c-preload/compiler-wrapper: line 21: 12475 Killed   
  "$@"

Compiler returned: 137

The followings are my test environment and test steps.

$clang -v
clang version 9.0.0 (trunk 354742)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm/build/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

$opt -instcombine -structurizecfg -loop-extract -loop-rotate -newgvn
-loop-versioning -loop-extract  small.bc -o small-opt.bc

The following is the source code of small.c
a;
b() {
  int c = 0;
  for (; c; ++c)
if (a)
  break;
}

-- 
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 40938] New: opt crashes with "opt -newgvn -inline -licm -loop-extract -ipsccp -adce" : Assertion `CallSites.empty() && "Dangling pointers found in call sites map"' failed.

2019-03-02 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40938

Bug ID: 40938
   Summary: opt crashes with "opt -newgvn -inline -licm
-loop-extract -ipsccp -adce" : Assertion
`CallSites.empty() && "Dangling pointers found in call
sites map"' 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 21554
  --> https://bugs.llvm.org/attachment.cgi?id=21554&action=edit
.bc file of the source code

Using godbolt (https://godbolt.org/), I find this bug can be reproduced by opt
7/truck version. The following is the output.

Stack dump:

0.  Program arguments: /opt/compiler-explorer/clang-7.0.0/bin/opt -o
/tmp/compiler-explorer-compiler11923-62-ad6yqc.vcsbl/output.s -S -newgvn
-inline -licm -loop-extract -ipsccp -adce  

1.  Running pass 'Function Pass Manager' on module ''.

2.  Running pass 'Aggressive Dead Code Elimination' on function '@main'

#0 0x55a8103ff39a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/opt/compiler-explorer/clang-7.0.0/bin/opt+0x1fda39a)

#1 0x55a8103fd914 llvm::sys::RunSignalHandlers()
(/opt/compiler-explorer/clang-7.0.0/bin/opt+0x1fd8914)

#2 0x55a8103fda52 SignalHandler(int)
(/opt/compiler-explorer/clang-7.0.0/bin/opt+0x1fd8a52)

#3 0x7fa6913bb890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)

#4 0x55a81014c480 (anonymous
namespace)::AggressiveDeadCodeElimination::markLive(llvm::Instruction*)
(/opt/compiler-explorer/clang-7.0.0/bin/opt+0x1d27480)

#5 0x55a81015591e (anonymous
namespace)::ADCELegacyPass::runOnFunction(llvm::Function&) (.part.342)
(/opt/compiler-explorer/clang-7.0.0/bin/opt+0x1d3091e)

#6 0x55a80fe1a1c9 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/opt/compiler-explorer/clang-7.0.0/bin/opt+0x19f51c9)

#7 0x55a80fe1a211 llvm::FPPassManager::runOnModule(llvm::Module&)
(/opt/compiler-explorer/clang-7.0.0/bin/opt+0x19f5211)

#8 0x55a80fe19700 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/opt/compiler-explorer/clang-7.0.0/bin/opt+0x19f4700)

#9 0x55a80ea6d868 main
(/opt/compiler-explorer/clang-7.0.0/bin/opt+0x648868)

#10 0x7fa690279b97 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b97)

#11 0x55a80eb0c59a _start
(/opt/compiler-explorer/clang-7.0.0/bin/opt+0x6e759a)

/compiler-explorer/c-preload/compiler-wrapper: line 21: 14757 Segmentation
fault  (core dumped) "$@"

Compiler returned: 139

But in my test environment, the outputs of the debug version and release
version are different.

$clang -v
clang version 9.0.0 (trunk 354742)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm/build/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

$opt(debug version) -newgvn -inline -licm -loop-extract -ipsccp -adce small.bc
-o small-opt.bc
opt:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Analysis/CallGraphSCCPass.cpp:378:
bool {anonymous}::CGPassManager::RefreshCallGraph(const llvm::CallGraphSCC&,
llvm::CallGraph&, bool): Assertion `CallSites.empty() && "Dangling pointers
found in call sites map"' failed.
Stack dump:
0.  Program arguments:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/build2/bin/opt -newgvn -inline
-licm -loop-extract -ipsccp -adce small.bc -o small-opt.bc 
1.  Running pass 'CallGraph Pass Manager' on module 'small.bc'.
 #0 0x558ff0e84b7b llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:494:0
 #1 0x558ff0e84c0e PrintStackTraceSignalHandler(void*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:558:0
 #2 0x558ff0e82b92 llvm::sys::RunSignalHandlers()
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Signals.cpp:68:0
 #3 0x558ff0e8459d SignalHandler(int)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:357:0
 #4 0x7f793d98b890 __restore

[llvm-bugs] [Bug 40939] New: ocaml warning: implicit declaration of function

2019-03-02 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40939

Bug ID: 40939
   Summary: ocaml   warning: implicit declaration of function
   Product: clang
   Version: 7.0
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: dmga...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk

Created attachment 21555
  --> https://bugs.llvm.org/attachment.cgi?id=21555&action=edit
error files for the build

The follow errors stops the build of Clang 7 source by the Clang 7 compiler on
Ubuntu 18.04 LTS 64Bit. This build is for a cross-compiler. The errors are in
the llvm bindings for ocaml. A file is not build because of the errors. So the
build fails consistently at this point. 

Errors:

/home/zorronten/MyStuff/builds/aros-bld-clang6d/bin/linux-x86_64/gen/host/tools/crosstools/llvm/bindings/ocaml/transforms/scalar_opts/scalar_opts_ocaml.c:
In function ‘llvm_add_lower_switch’:
/home/zorronten/MyStuff/builds/aros-bld-clang6d/bin/linux-x86_64/gen/host/tools/crosstools/llvm/bindings/ocaml/transforms/scalar_opts/scalar_opts_ocaml.c:138:3:
warning: implicit declaration of function ‘LLVMAddLowerSwitchPass’; did you
mean ‘LLVMAddLoopUnswitchPass’? [-Wimplicit-function-declaration]
   LLVMAddLowerSwitchPass(PM);
   ^~
   LLVMAddLoopUnswitchPass
/home/zorronten/MyStuff/builds/aros-bld-clang6d/bin/linux-x86_64/gen/host/tools/crosstools/llvm/bindings/ocaml/transforms/scalar_opts/scalar_opts_ocaml.c:
In function ‘llvm_add_promote_memory_to_register’:
/home/zorronten/MyStuff/builds/aros-bld-clang6d/bin/linux-x86_64/gen/host/tools/crosstools/llvm/bindings/ocaml/transforms/scalar_opts/scalar_opts_ocaml.c:144:3:
warning: implicit declaration of function ‘LLVMAddPromoteMemoryToRegisterPass’;
did you mean ‘LLVMAddDemoteMemoryToRegisterPass’?
[-Wimplicit-function-declaration]
   LLVMAddPromoteMemoryToRegisterPass(PM);
   ^~
   LLVMAddDemoteMemoryToRegisterPass
CMake Error at bindings/ocaml/llvm/cmake_install.cmake:49 (file):
  file INSTALL cannot copy file
 
"/home/zorronten/MyStuff/builds/aros-bld-clang6d/bin/linux-x86_64/gen/host/tools/crosstools/llvm/bindings/ocaml/llvm/llvm.mli"
  to "/usr/lib/ocaml/llvm/llvm.mli".
Call Stack (most recent call first):
  bindings/ocaml/cmake_install.cmake:42 (include)
  cmake_install.cmake:67 (include)

-- 
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