[LLVMbugs] [Bug 17048] New: "Alignment is not a power of two!" assertion failed in llvm::BumpPtrAllocator::Allocate()
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Sep 1 04:08:25 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17048
Bug ID: 17048
Summary: "Alignment is not a power of two!" assertion failed in
llvm::BumpPtrAllocator::Allocate()
Product: clang
Version: 3.3
Hardware: Other
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: peter at rulingia.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Whilst compiling the following code on FreeBSD 10-CURRENT/arm (Raspberry-Pi)
with the specified command line, I get an "alignment is not a power of two"
assertion failure.
$ cat <<E*O*F > /tmp/test.i
extern void __stack_chk_fail (void);
void
__attribute__((visibility ("hidden")))
__stack_chk_fail_local (void)
{
__stack_chk_fail ();
}
E*O*F
$ /a/obj/usr/src/tmp/usr/bin/clang -cc1 -triple armv6--freebsd10.0-gnueabi -S
-disable-free -main-file-name ssp-local.c -mrelocation-model pic -pic-level 2
-mdisable-fp-elim -mconstructor-aliases -target-abi aapcs-linux -target-cpu
arm1136jf-s -msoft-float -mfloat-abi soft -target-feature +soft-float
-target-feature +soft-float-abi -target-feature -neon -g -coverage-file
/tmp/test.s -O2 -std=gnu99 -fno-dwarf-directory-asm -fdebug-compilation-dir
/usr/obj/usr/src/gnu/lib/libssp/libssp_nonshared -ferror-limit 19
-fmessage-length 168 -fvisibility hidden -mstackrealign -fno-signed-char
-fobjc-runtime=gnustep -fobjc-default-synthesize-properties
-fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops
-o /tmp/test.s -x c /tmp/test.i
Assertion failed: (Alignment && (Alignment & (Alignment - 1)) == 0 &&
"Alignment is not a power of two!"), function AlignPtr, file
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Allocator.cpp,
line 38.
Stack dump:
0. Program arguments: /a/obj/usr/src/tmp/usr/bin/clang -cc1 -triple
armv6--freebsd10.0-gnueabi -S -disable-free -main-file-name ssp-local.c
-mrelocation-model pic -pic-level 2 -mdisable-fp-elim -mconstructor-aliases
-target-abi aapcs-linux -target-cpu arm1136jf-s -msoft-float -mfloat-abi soft
-target-feature +soft-float -target-feature +soft-float-abi -target-feature
-neon -g -coverage-file /tmp/test.s -O2 -std=gnu99 -fno-dwarf-directory-asm
-fdebug-compilation-dir /usr/obj/usr/src/gnu/lib/libssp/libssp_nonshared
-ferror-limit 19 -fmessage-length 168 -fvisibility hidden -mstackrealign
-fno-signed-char -fobjc-runtime=gnustep -fobjc-default-synthesize-properties
-fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops
-o /tmp/test.s -x c /tmp/test.i
1. <eof> parser at end of file
Abort (core dumped)
$ /a/obj/usr/src/tmp/usr/bin/clang --version
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: armv6--freebsd10.0-gnueabi
Thread model: posix
$
When run within gdb, the backtrace is:
#0 0x01f7b50c in __assert ()
#1 0x01eaf9bc in llvm::BumpPtrAllocator::AlignPtr (Ptr=0x26 <Error reading
address 0x26: Bad address>, Alignment=37334412)
at
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Allocator.cpp:37
#2 0x01eafa24 in llvm::BumpPtrAllocator::Allocate (this=0x22848768, Size=14,
Alignment=3)
at
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Allocator.cpp:102
#3 0x00463540 in clang::CodeGen::CGDebugInfo::CreateCompileUnit
(this=0x22848600) at Allocator.h:163
#4 0x00463bb4 in CGDebugInfo (this=0x22848600, CGM=<value optimized out>)
at
/usr/src/lib/clang/libclangcodegen/../../../contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp:45
#5 0x002a54f8 in CodeGenModule (this=0x2284fb00, C=@0x22876000,
CGO=@0x2287b094, M=@0x22803100, TD=@0x2283d300, diags=@0x22824300)
at
/usr/src/lib/clang/libclangcodegen/../../../contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp:127
#6 0x002a0748 in Initialize (this=0x2287b080, Context=@0x22876000)
at
/usr/src/lib/clang/libclangcodegen/../../../contrib/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp:60
#7 0x0029c930 in clang::BackendConsumer::Initialize (this=0x22805100,
Ctx=@0x22876000)
at
/usr/src/lib/clang/libclangcodegen/../../../contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:89
#8 0x00a2fb54 in clang::Sema::Initialize (this=0x22886e00) at
/usr/src/lib/clang/libclangsema/../../../contrib/llvm/tools/clang/lib/Sema/Sema.cpp:120
#9 0x004d1f50 in $a () at
/usr/src/lib/clang/libclangparse/../../../contrib/llvm/tools/clang/lib/Parse/Parser.cpp:522
#10 0x004d1f50 in $a () at
/usr/src/lib/clang/libclangparse/../../../contrib/llvm/tools/clang/lib/Parse/Parser.cpp:522
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130901/16684e03/attachment.html>
More information about the llvm-bugs
mailing list