Comments (5)
See PR at #61
from citrus.
Note that the underlying issue is fixed in Ruby 3.0.3.
from citrus.
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.
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.
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)
- Does not run on Rubinius HOT 1
- Help creating a rule for a last name HOT 4
- super cannot be at the end of a rule
- Question about repetition of nested rules HOT 1
- Support for inheritance?
- Unable to collect parse results HOT 1
- Custom Rule (ex Lemmatization) HOT 4
- Review for releasing 2.5.0 HOT 3
- Display parse matches or state on ParseError HOT 3
- Ruby 2.2.0 Warnings for named arguments
- Documentation missing HOT 4
- Cut a minor release with recent warning fixes. HOT 3
- Add support for Rubinius HOT 4
- README instructions not working (grammars not included)
- A way to pass context to grammar/rules HOT 1
- Broken extension on Ruby 2.5 HOT 1
- Logic.parse() failed to correctly parse expression that contains space in array's element
- calc.citrus et al not included in gem
- Release 3.0.3? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from citrus.