<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 - llvm-mc: assertion failure if an .align argument is extremely large"
href="https://bugs.llvm.org/show_bug.cgi?id=35218">35218</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>llvm-mc: assertion failure if an .align argument is extremely large
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>MC
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ruiu@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>$ echo '.align 0x100000000' | llvm-mc -filetype=obj -triple=x86_64-pc-linux -
llvm-mc: /ssd/llvm-project/llvm/include/llvm/Support/MathExtras.h:678: uint64_t
llvm::alignTo(uint64_t, uint64_t, uint64_t): Assertion `Align != 0u && "Align
can't be 0."' failed.
#0 0x00000000014a8fd9 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/ssd/llvm-project/llvm/lib/Support/Unix/Signals.inc:398:11
#1 0x00000000014a9189 PrintStackTraceSignalHandler(void*)
/ssd/llvm-project/llvm/lib/Support/Unix/Signals.inc:462:1
#2 0x00000000014a7743 llvm::sys::RunSignalHandlers()
/ssd/llvm-project/llvm/lib/Support/Signals.cpp:0:5
#3 0x00000000014a94e4 SignalHandler(int)
/ssd/llvm-project/llvm/lib/Support/Unix/Signals.inc:252:1
#4 0x00007ffff7bcc330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#5 0x00007ffff67bbc37 gsignal
/build/eglibc-SvCtMH/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#6 0x00007ffff67bf028 abort
/build/eglibc-SvCtMH/eglibc-2.19/stdlib/abort.c:91:0
#7 0x00007ffff67b4bf6 __assert_fail_base
/build/eglibc-SvCtMH/eglibc-2.19/assert/assert.c:92:0
#8 0x00007ffff67b4ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#9 0x0000000000d3eac3 llvm::alignTo(unsigned long, unsigned long, unsigned
long) /ssd/llvm-project/llvm/include/llvm/Support/MathExtras.h:679:11
#10 0x0000000000e74e51 llvm::OffsetToAlignment(unsigned long, unsigned long)
/ssd/llvm-project/llvm/include/llvm/Support/MathExtras.h:720:32
#11 0x00000000012a6ed0 llvm::MCAssembler::computeFragmentSize(llvm::MCAsmLayout
const&, llvm::MCFragment const&) const
/ssd/llvm-project/llvm/lib/MC/MCAssembler.cpp:299:21
#12 0x00000000012a9631 llvm::MCAssembler::finishLayout(llvm::MCAsmLayout&)
/ssd/llvm-project/llvm/lib/MC/MCAssembler.cpp:985:5
#13 0x00000000012a8df6 llvm::MCAssembler::layout(llvm::MCAsmLayout&)
/ssd/llvm-project/llvm/lib/MC/MCAssembler.cpp:0:3
#14 0x00000000012a96c3 llvm::MCAssembler::Finish()
/ssd/llvm-project/llvm/lib/MC/MCAssembler.cpp:769:21
#15 0x000000000130bdc3 llvm::MCObjectStreamer::FinishImpl()
/ssd/llvm-project/llvm/lib/MC/MCObjectStreamer.cpp:638:1
#16 0x00000000012e66e7 llvm::MCELFStreamer::FinishImpl()
/ssd/llvm-project/llvm/lib/MC/MCELFStreamer.cpp:628:1
#17 0x000000000131733f llvm::MCStreamer::Finish()
/ssd/llvm-project/llvm/lib/MC/MCStreamer.cpp:818:1
#18 0x000000000135458e (anonymous namespace)::AsmParser::Run(bool, bool)
/ssd/llvm-project/llvm/lib/MC/MCParser/AsmParser.cpp:0:9
#19 0x0000000000c49f57 AssembleInput(char const*, llvm::Target const*,
llvm::SourceMgr&, llvm::MCContext&, llvm::MCStreamer&, llvm::MCAsmInfo&,
llvm::MCSubtargetInfo&, llvm::MCInstrInfo&, llvm::MCTargetOptions&)
/ssd/llvm-project/llvm/tools/llvm-mc/llvm-mc.cpp:426:13
#20 0x0000000000c48aec main
/ssd/llvm-project/llvm/tools/llvm-mc/llvm-mc.cpp:610:9
#21 0x00007ffff67a6f45 __libc_start_main
/build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:321:0
#22 0x0000000000c47029 _start (bin/llvm-mc+0xc47029)
Stack dump:
0. Program arguments: bin/llvm-mc -filetype=obj -triple=x86_64-pc-linux -
Aborted (core dumped)</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>