rubyjs / therubyracer

Embed the V8 Javascript Interpreter into Ruby
1.67k stars 190 forks source link

the ruby racer fails with hardened gcc flags #453

Closed ibotty closed 7 months ago

ibotty commented 5 years ago

e.g. in a rails project with the less-rails gem, e.g. bundle exec rake -T fails with

/usr/include/c++/9/bits/stl_vector.h:1042: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = v8::Handle<v8::Value>; _Alloc = std::allocator<v8::Handle<v8::Value> >; std::vector<_Tp, _Alloc>::reference = v8::Handle<v8::Value>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.      
Aborted (core dumped)

That's due to gcc's hardening flags -D_GLIBCXX_ASSERTIONS.

See this stack overflow answer https://stackoverflow.com/questions/51661931/rails-s-command-issue

da2x commented 5 years ago

Same issue in Fedora 30. (Fedora uses gcc hardening by default.)

victorsosa commented 4 years ago

releated to the PR #451

lloeki commented 7 months ago

Sorry but this gem is unmaintained, so I will close this issue.

We recommend going with mini_racer + libv8-node. If you feel the issue is still relevant to either of those, please open an issue over there!