Code Monkey home page Code Monkey logo

Comments (5)

flavorjones avatar flavorjones commented on May 11, 2024 2

See PR at #61

from citrus.

flavorjones avatar flavorjones commented on May 11, 2024 2

Note that the underlying issue is fixed in Ruby 3.0.3.

from citrus.

vhiairrassary avatar vhiairrassary commented on May 11, 2024

Same issue on our side. Everything work perfectly until we migrate to Ruby 3.0.2. Here is the top of our trace

/opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/citrus-3.0.2/lib/citrus.rb:1286: [BUG] Segmentation fault at 0x000055892ffad208
ruby 3.0.2p***7 (2021-07-07 revision 0db68f0233) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0172 p:---- s:***35 e:00***34 CFUNC  :slice!
c:0171 p:0063 s:***29 e:00***28 METHOD /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/citrus-3.0.2/lib/citrus.rb:1286 [FINISH]
c:0170 p:---- s:***20 e:00***19 CFUNC  :new
c:0169 p:0139 s:***13 e:00***12 METHOD /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/citrus-3.0.2/lib/citrus.rb:1470
c:0168 p:0011 s:0998 e:000997 METHOD /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/citrus-3.0.2/lib/citrus.rb:1330
c:0167 p:0003 s:0993 e:000992 METHOD /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/citrus-3.0.2/lib/citrus.rb:1336
c:0166 p:0062 s:0988 e:000983 BLOCK  (eval):4 [FINISH]

As said above, it does not seem to happen on every run. Issue happens on macOS & Ubuntu.

from citrus.

vhiairrassary avatar vhiairrassary commented on May 11, 2024

Minimal reproduction is available at https://github.com/vhiairrassary/citrus-issue-60. To reproduce the issue, I just use the calc grammar from citrus and run it indefinitely until it crashes. Full stack trace is available in the repository README.md file.

require 'citrus'
Citrus.load 'calc'

loop do
  puts Calc.parse('1 + 2 + 3').value
end

from citrus.

flavorjones avatar flavorjones commented on May 11, 2024

Please note that this is a bug in Ruby 3.0.0-3.0.2. I've reported it upstream at https://bugs.ruby-lang.org/issues/18138 and submitted a PR to fix it at ruby/ruby#4787

In the meantime, I'll submit a PR to citrus that will work around the bug conditions.

from citrus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.