Bug#855012: clang-3.9: Segmentation fault when compiling
Eric Peter Stavarache
estavarache at bitdefender.com
Mon Feb 13 08:27:16 UTC 2017
Package: clang-3.9
Version: 1:3.9.1-4
Severity: important
Dear Maintainer,
This the code in question:
#include <memory>
struct StructA;
struct StructB;
struct StructC;
enum class action { };
static action foo(StructA ð_context)
{
}
static void fun(struct StructB *response, void *callbackContext)
{
std::shared_ptr<StructC> context =
std::shared_ptr<StructC>(reinterpret_cast<StructC *>(callbackContext));
}
This is the compilation command:
/usr/lib/llvm-3.9/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name netparser.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -resource-dir /usr/lib/llvm-3.9/bin/../lib/clang/3.9.1 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/x86_64-linux-gnu/c++/6.3.0 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/x86_64-linux-gnu/c++/6.3.0 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/backward -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-3.9/bin/../lib/clang/3.9.1/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -Wall -Wextra -Werror -Wno-strict-overflow -Wfatal-errors -std=c++14 -fdeprecated-macro -ferror-limit 19 -fmessage-length 131 -fvisibility hidden -fwrapv -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o main.cpp.o -x c++ main.cpp
I have also attached a core file generated.
-- System Information:
Debian Release: 9.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armel
Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages clang-3.9 depends on:
ii binutils 2.27.90.20170124-2
ii libc6 2.24-9
ii libc6-dev 2.24-9
ii libclang-common-3.9-dev 1:3.9.1-4
ii libclang1-3.9 1:3.9.1-4
ii libgcc-6-dev 6.3.0-6
ii libgcc1 1:6.3.0-6
ii libjsoncpp1 1.7.4-3
ii libllvm3.9 1:3.9.1-4
ii libobjc-6-dev 6.3.0-6
ii libstdc++-6-dev 6.3.0-6
ii libstdc++6 6.3.0-6
Versions of packages clang-3.9 recommends:
ii llvm-3.9-dev 1:3.9.1-4
ii python 2.7.13-2
Versions of packages clang-3.9 suggests:
pn clang-3.9-doc <none>
pn gnustep <none>
pn gnustep-devel <none>
-- no debconf information
-------------- next part --------------
#include <memory>
struct StructA;
struct StructB;
struct StructC;
enum class action { };
static action foo(StructA ð_context)
{
}
static void fun(struct StructB *response, void *callbackContext)
{
std::shared_ptr<StructC> context =
std::shared_ptr<StructC>(reinterpret_cast<StructC *>(callbackContext));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: core.tar.bz2
Type: application/x-bzip2
Size: 3396305 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20170213/22037291/attachment-0001.bin>
More information about the Pkg-llvm-team
mailing list