Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use c++14 #4581

Closed
wants to merge 1 commit into from
Closed

use c++14 #4581

wants to merge 1 commit into from

Conversation

jsteemann
Copy link
Contributor

Experimental move to C++14
This is a search&replace solution for moving to C++14. It's possible that this does not cover all places in the code that need adjustment.

@jsteemann jsteemann added this to the devel milestone Feb 13, 2018
@jsteemann
Copy link
Contributor Author

jsteemann commented Feb 13, 2018

Running the AQL tests shows that it gets stuck somewhere in jemalloc:

$ scripts/unittest shell_server_aql
...

#0  __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1  0x00007f91fe51419d in __GI___pthread_mutex_lock (mutex=mutex@entry=0x7f91eeb2b9d0) at ../nptl/pthread_mutex_lock.c:80
#2  0x00005601a3fc60dd in malloc_mutex_lock_final (mutex=0x7f91eeb2b990) at include/jemalloc/internal/mutex.h:141
#3  je_malloc_mutex_lock_slow (mutex=mutex@entry=0x7f91eeb2b990) at src/mutex.c:83
#4  0x00005601a3fd2b68 in malloc_mutex_lock (mutex=0x7f91eeb2b990, tsdn=<optimized out>) at include/jemalloc/internal/mutex.h:205
#5  je_tcache_bin_flush_small (tsd=0x7f91ce2fce38, tcache=<optimized out>, tbin=<optimized out>, binind=1, rem=16) at src/tcache.c:134
#6  0x00005601a3fd3cbe in je_tcache_event_hard (tsd=<optimized out>, tcache=0x7f91ce2fcff0) at src/tcache.c:54
#7  0x00005601a278818f in __gnu_cxx::new_allocator<std::vector<unsigned long, std::allocator<unsigned long> > >::deallocate (
    this=0x7f91ce2f8d20, __p=<optimized out>) at /usr/include/c++/7/ext/new_allocator.h:125
#8  std::allocator_traits<std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > >::deallocate (__a=..., 
    __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/7/bits/alloc_traits.h:462
#9  std::_Vector_base<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > >::_M_deallocate (this=0x7f91ce2f8d20, __n=<optimized out>, __p=<optimized out>)
    at /usr/include/c++/7/bits/stl_vector.h:180
#10 std::_Vector_base<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > >::~_Vector_base (this=0x7f91ce2f8d20, __in_chrg=<optimized out>) at /usr/include/c++/7/bits/stl_vector.h:162
#11 std::vector<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > >::~vector (this=0x7f91ce2f8d20, __in_chrg=<optimized out>) at /usr/include/c++/7/bits/stl_vector.h:435
#12 arangodb::velocypack::Builder::~Builder (this=0x7f91ce2f8ce0, __in_chrg=<optimized out>)
    at 3rdParty/velocypack/include/velocypack/Builder.h:182
#13 0x00005601a2a8ae82 in InsertVocbaseCol (isolate=<optimized out>, isolate@entry=0x7f91f5c6e100, args=..., 
    attachment=<optimized out>, attachment@entry=0x0) at arangod/V8Server/v8-collection.cpp:2225
#14 0x00005601a2a8b7f0 in JS_InsertVocbaseCol (args=...) at arangod/V8Server/v8-collection.cpp:2313

@dothebart
Copy link
Contributor

when you change things in V8 please remember to also apply them in https://github.com/arangodb-helper/v8/tree/arangodb/3.3

@dothebart
Copy link
Contributor

dothebart commented Feb 14, 2018

On cupertino (mac) the only thing I find in c++ --help is: -fsized-deallocation Enable C++14 sized global deallocation functions

@jsteemann
Copy link
Contributor Author

@dothebart : this PR is supposed to be a test for whether compilation and tests work at all with C++14, and what changes will be required for it. If everyhing works and we are all happy with it, we can actually make changes in other repositories that we rely upon and perform the switchover.

@gnusi
Copy link
Contributor

gnusi commented Feb 14, 2018

Is that somehow related?
redis/redis#3799
jemalloc/jemalloc#585
which version we use?

@jsteemann
Copy link
Contributor Author

@gnusi : Probably it's unrelated. We have not changed out version of jemalloc (5.0.1) but just told the compiler to use -std=c++14 instead of -std=c++11. We are also not using libunwind.

@jsteemann
Copy link
Contributor Author

closing as obsoleted

@jsteemann jsteemann closed this Jul 16, 2018
@fceller fceller deleted the feature/cxx-14 branch August 9, 2018 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants