<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - Segfault when instantiating function definition '__shared_ptr_emplace'"
href="https://llvm.org/bugs/show_bug.cgi?id=28887">28887</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Segfault when instantiating function definition '__shared_ptr_emplace'
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.5
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</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>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>anonimal@i2pmail.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Steps to reproduce:
$ git clone --recursive <a href="https://github.com/monero-project/kovri.git">https://github.com/monero-project/kovri.git</a>
$ cd kovri/ && export CC=clang35 CXX=clang++35 CXXFLAGS="-maes -march=native"
$ gmake dependencies
...
$ gmake # built against be490e9
mkdir -p build/
cd build/ && cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_C_COMPILER=clang35 -D
CMAKE_CXX_COMPILER=clang++35 ../ && gmake
-- The C compiler identification is Clang 3.5.2
-- The CXX compiler identification is Clang 3.5.2
-- Check for working C compiler: /usr/local/bin/clang35
-- Check for working C compiler: /usr/local/bin/clang35 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/local/bin/clang++35
-- Check for working CXX compiler: /usr/local/bin/clang++35 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CXX14_SUPPORTED
-- Performing Test CXX14_SUPPORTED - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Boost version: 1.61.0
-- Found the following Boost libraries:
-- chrono
-- log
-- program_options
-- date_time
-- thread
-- system
-- filesystem
-- regex
-- log_setup
-- atomic
-- Found Boost: /usr/local/include,
/usr/local/lib/libboost_chrono.so;/usr/local/lib/libboost_log.so;/usr/local/lib/libboost_program_options.so;/usr/
local/lib/libboost_date_time.so;/usr/local/lib/libboost_thread.so;/usr/local/lib/libboost_system.so;/usr/local/lib/libboost_filesystem.so;/usr/local/
lib/libboost_regex.so;/usr/local/lib/libboost_log_setup.so;/usr/local/lib/libboost_atomic.so
-- Found Crypto++: /usr/home/anonimal/kovri/deps/cryptopp,
/usr/home/anonimal/kovri/deps/cryptopp/build/libcryptopp.so
-- Found OpenSSL: /usr/lib/libssl.so;/usr/lib/libcrypto.so (found version
"1.0.1p")
-- Found cpp-netlib:
/usr/home/anonimal/kovri/deps/cpp-netlib;/usr/local/include,
cppnetlib-client-connections;cppnetlib-server-parsers;cppnetlib-uri
-- Found MiniUPnP headers: /usr/local/include/miniupnpc
-- ---------------------------------------
-- Build type : Debug
-- Compiler vendor : Clang
-- Compiler version : 3.5.2
-- Compiler path : /usr/local/bin/clang++35
-- Install prefix: : /usr/local
-- Kovri data directory:
-- Options:
-- BENCHMARKS : OFF
-- BINARY : ON
-- CRYPTOPP : ON
-- DOXYGEN : OFF
-- HARDENING : OFF
-- LIBRARY : ON
-- OPTIMIZATION : OFF
-- STATIC BUILD : OFF
-- SUPERCOP : ON
-- TESTS : OFF
-- UPnP : OFF
-- ---------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/home/anonimal/kovri/build
gmake[1]: Entering directory '/usr/home/anonimal/kovri/build'
gmake[2]: Entering directory '/usr/home/anonimal/kovri/build'
gmake[3]: Entering directory '/usr/home/anonimal/kovri/build'
Scanning dependencies of target kovri-core
gmake[3]: Leaving directory '/usr/home/anonimal/kovri/build'
gmake[3]: Entering directory '/usr/home/anonimal/kovri/build'
[22/243]
[ 1%] Building CXX object src/core/CMakeFiles/kovri-core.dir/Garlic.cpp.o
In file included from /usr/home/anonimal/kovri/src/core/Garlic.cpp:43:
In file included from
/usr/home/anonimal/kovri/src/core/../client/Destination.h:49:
In file included from /usr/home/anonimal/kovri/src/core/./NetworkDatabase.h:56:
/usr/home/anonimal/kovri/src/core/./tunnel/Tunnel.h:159:8: warning:
'i2p::tunnel::OutboundTunnel::SendTunnelDataMsg' hides overloaded virtual
function [-Woverloaded-virtual]
void SendTunnelDataMsg(
^
/usr/home/anonimal/kovri/src/core/./tunnel/Tunnel.h:129:8: note: hidden
overloaded virtual function 'i2p::tunnel::Tunnel::SendTunnelDataMsg'
declared here: different number of parameters (1 vs 3)
void SendTunnelDataMsg(
^
/usr/home/anonimal/kovri/src/core/./tunnel/Tunnel.h:165:8: warning:
'i2p::tunnel::OutboundTunnel::SendTunnelDataMsg' hides overloaded virtual
function [-Woverloaded-virtual]
void SendTunnelDataMsg(
^
/usr/home/anonimal/kovri/src/core/./tunnel/Tunnel.h:129:8: note: hidden
overloaded virtual function 'i2p::tunnel::Tunnel::SendTunnelDataMsg'
declared here: type mismatch at 1st parameter
('std::shared_ptr<i2p::I2NPMessage>' vs 'const std::vector<TunnelMessageBlock>
&')
void SendTunnelDataMsg(
^
Stack dump:
0. Program arguments: /usr/local/llvm35/bin/clang -cc1 -triple
x86_64-portbld-freebsd10.1 -emit-obj -mrelax-all -disable-free
-disable-llvm-veri
fier -main-file-name Garlic.cpp -mrelocation-model pic -pic-level 2
-mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables
-target-cpu
bdver1 -target-feature +aes -target-linker-version 2.17.50 -gdwarf-2
-dwarf-column-info -coverage-file /usr/home/anonimal/kovri/build/src/core/CMake
Files/kovri-core.dir/Garlic.cpp.o -resource-dir
/usr/local/llvm35/bin/../lib/clang/3.5.2 -D BOOST_ALL_DYN_LINK -D
_GLIBCXX_USE_NANOSLEEP=1 -I /usr/lo
cal/include -I /usr/home/anonimal/kovri/deps/cryptopp/.. -I
/usr/home/anonimal/kovri/deps/cpp-netlib -I /usr/home/anonimal/kovri -I
/usr/home/anonima
l/kovri/src/core/. -I /usr/home/anonimal/kovri/src/core/.. -internal-isystem
/usr/include/c++/v1 -Wall -Wextra -Winvalid-pch -std=c++1y -fdeprecated-
macro -fdebug-compilation-dir /usr/home/anonimal/kovri/build/src/core
-ferror-limit 19 -fmessage-length 149 -pthread -mstackrealign -fobjc-runtime=gn
ustep -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o CMakeFiles/kovri-core.dir/Garlic.cpp.o -x c++
/usr/home/anonimal
/kovri/src/core/Garlic.cpp
1. <eof> parser at end of file
2. /usr/include/c++/v1/memory:4642:1: instantiating function definition
'make_shared'
3. /usr/include/c++/v1/memory:3958:9: instantiating function definition
'make_shared'
4. /usr/include/c++/v1/memory:3703:9: instantiating function definition
'__shared_ptr_emplace'
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.5.2 (tags/RELEASE_352/final)
Target: x86_64-portbld-freebsd10.1
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/Garlic-f543b2.cpp
clang: note: diagnostic msg: /tmp/Garlic-f543b2.sh
clang: note: diagnostic msg:
********************
gmake[3]: *** [src/core/CMakeFiles/kovri-core.dir/build.make:63:
src/core/CMakeFiles/kovri-core.dir/Garlic.cpp.o] Error 254
gmake[3]: Leaving directory '/usr/home/anonimal/kovri/build'
gmake[2]: *** [CMakeFiles/Makefile2:226:
src/core/CMakeFiles/kovri-core.dir/all] Error 2
gmake[2]: Leaving directory '/usr/home/anonimal/kovri/build'
gmake[1]: *** [Makefile:128: all] Error 2
gmake[1]: Leaving directory '/usr/home/anonimal/kovri/build'
gmake: *** [Makefile:100: dynamic] Error 2
$ cat /tmp/Garlic-f543b2.sh
"/usr/local/llvm35/bin/clang" -cc1 -triple x86_64-portbld-freebsd10.1 -emit-obj
-mrelax-all -disable-free -disable-llvm-verifier -main-file-name Garlic.cpp
-mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu bdver1 -target-feature +aes
-target-linker-version 2.17.50 -gdwarf-2 -dwarf-column-info -D
"BOOST_ALL_DYN_LINK" -D "_GLIBCXX_USE_NANOSLEEP=1" -Wall -Wextra -Winvalid-pch
-std=c++1y -fdeprecated-macro -ferror-limit 19 -fmessage-length 149 -pthread
-mstackrealign -fobjc-runtime=gnustep -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -x c++ Garlic-f543b2.cpp
Notes:
- Garlic-f543b2.cpp is attached
- Unable to reproduce segfault with 3.6</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>