<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Seg fault in ArgumentPromotion"
   href="https://bugs.llvm.org/show_bug.cgi?id=44248">44248</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Seg fault in ArgumentPromotion
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Interprocedural Optimizations
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>paulsson@linux.vnet.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22919" name="attach_22919" title="testcase">attachment 22919</a> <a href="attachment.cgi?id=22919&action=edit" title="testcase">[details]</a></span>
testcase

I got a test case that fails with a seg fault every now and then... :-/

It seemed that I had to play around with removing options and all of a sudden
the crash would appear again, every once in a while...

This is the full command line that triggered the (csmith) crash:
clang -O3 -march=arch13 crash1.i -o a.out -w -mllvm -disable-preinline -mllvm
-loop-predication-enable-count-down-loop=false -mllvm -expensive-combines
-mllvm -max-interleave-group-factor=0 -mllvm -phi-node-folding-threshold=4
-mllvm -jump-threading-across-loop-headers -mllvm -pre-RA-sched=list-ilp -\
mllvm -disable-dfa-sched -mllvm -disable-machine-dce -mllvm
-disable-machine-sink -mllvm -disable-early-ifcvt -mllvm
-disable-preheader-prot -mllvm -addr-sink-new-phis -mllvm -verify-misched
-mllvm -hoist-cheap-insts -mllvm -terminal-rule

I then reran and removed one argument pair at a time until I got the crash:

clang -O3 -march=arch13 crash1.i -o a.out -w -mllvm -disable-preinline -mllvm
-loop-predication-enable-count-down-loop=false -mllvm -expensive-combines
-mllvm -max-interleave-group-factor=0 -mllvm -phi-node-folding-threshold=4
-mllvm -jump-threading-across-loop-headers -mllvm -pre-RA-sched=list-ilp -\
mllvm -disable-dfa-sched -mllvm -disable-machine-dce -mllvm
-disable-machine-sink -mllvm -disable-early-ifcvt -mllvm
-disable-preheader-prot -mllvm -addr-sink-new-phis -mllvm -verify-misched
-mllvm -hoist-cheap-insts

clang -O3 -march=arch13 crash1.i -o a.out -w -mllvm -disable-preinline -mllvm
-loop-predication-enable-count-down-loop=false -mllvm -expensive-combines
-mllvm -max-interleave-group-factor=0 -mllvm -phi-node-folding-threshold=4
-mllvm -jump-threading-across-loop-headers -mllvm -pre-RA-sched=list-ilp -\
mllvm -disable-dfa-sched -mllvm -disable-machine-dce -mllvm
-disable-machine-sink -mllvm -disable-early-ifcvt -mllvm
-disable-preheader-prot -mllvm -addr-sink-new-phis -mllvm -verify-misched

...

clang -O3 -march=arch13 crash1.i -o a.out -w -mllvm -disable-preinline -mllvm
-loop-predication-enable-count-down-loop=false -mllvm -expensive-combines
-mllvm -max-interleave-group-factor=0 -mllvm -phi-node-folding-threshold=4
-mllvm -jump-threading-across-loop-headers

clang -O3 -march=arch13 crash1.i -o a.out -w -mllvm -disable-preinline -mllvm
-loop-predication-enable-count-down-loop=false -mllvm -expensive-combines
-mllvm -max-interleave-group-factor=0 -mllvm -phi-node-folding-threshold=4

Stack dump:
0.      Program arguments: clang-10 -cc1 -triple s390x-ibm-linux -emit-obj
-disable-free -main-file-name crash1.i -mrelocation-model static -mthread-model
posix -mframe-pointer=none -fmath-errno -fno-rounding-math -masm-verbose
-mconstructor-aliases -fuse-init-array -target-cpu arch13 -dwarf-column-i\
nfo -debugger-tuning=gdb -resource-dir lib/clang/10.0.0 -O3 -w
-fdebug-compilation-dir /home/ijonpan/csmith/run1 -ferror-limit 19
-fmessage-length 0 -fno-signed-char -fgnuc-version=4.2.1 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-mllvm -disable-p\
reinline -mllvm -loop-predication-enable-count-down-loop=false -mllvm
-expensive-combines -mllvm -max-interleave-group-factor=0 -mllvm
-phi-node-folding-threshold=4 -faddrsig -o /tmp/crash1-d335c2.o -x cpp-output
crash1.i
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'CallGraph Pass Manager' on module 'crash1.c'.
 #0 0x000002aa073b20d4 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(clang-10+0x18320d4)
 #1 0x000002aa073b000e llvm::sys::RunSignalHandlers() (clang-10+0x183000e)
 #2 0x000002aa073b01b0 SignalHandler(int) (clang-10+0x18301b0)
 #3 0x000002aa0d060c5e
 #4 0x000002aa085cfe84 llvm::CallGraphSCC::ReplaceNode(llvm::CallGraphNode*,
llvm::CallGraphNode*) (clang-10+0x2a4fe84)
 #5 0x000002aa06d93dfe (anonymous
namespace)::ArgPromotion::runOnSCC(llvm::CallGraphSCC&) (.part.0)
(clang-10+0x1213dfe)
 #6 0x000002aa085d2faa (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&) (clang-10+0x2a52faa)
 #7 0x000002aa06d01be4 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(clang-10+0x1181be4)
 #8 0x000002aa0763a094 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream, st\
d
::default_delete<llvm::raw_pwrite_stream> >) (clang-10+0x1aba094)
 #9 0x000002aa0829fc98
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(clang-10+0x271fc98)
#10 0x000002aa091270b0 clang::ParseAST(clang::Sema&, bool, bool)
(clang-10+0x35a70b0)
#11 0x000002aa0829ea8e clang::CodeGenAction::ExecuteAction()
(clang-10+0x271ea8e)
#12 0x000002aa07c311d8 clang::FrontendAction::Execute() (clang-10+0x20b11d8)
#13 0x000002aa07be9874
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(clang-10+0x2069874)
#14 0x000002aa07d08a12
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (clang-10+0x2188a12)
#15 0x000002aa06423488 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (clang-10+0x8a3488)
#16 0x000002aa063c2d98 main (clang-10+0x842d98)
#17 0x000003ff8b6ab6c2 __libc_start_main
/build/glibc-8Bkpa0/glibc-2.30/csu/libc-start.c:342:3
#18 0x000002aa0641f61c _start (clang-10+0x89f61c)
#19 0x0000000000000000
clang-10: error: unable to execute command: Segmentation fault
clang-10: error: clang frontend command failed due to signal (use -v to see
invocation)


This happened a few times more as well with more arguments... I suspect there
is some kind of memory dependency lurking around somewhere...</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>