[#116016] [Ruby master Bug#20150] Memory leak in grapheme clusters — "peterzhu2118 (Peter Zhu) via ruby-core" <ruby-core@...>
Issue #20150 has been reported by peterzhu2118 (Peter Zhu).
7 messages
2024/01/04
[#116382] [Ruby master Feature#20205] Enable `frozen_string_literal` by default — "byroot (Jean Boussier) via ruby-core" <ruby-core@...>
Issue #20205 has been reported by byroot (Jean Boussier).
77 messages
2024/01/23
[ruby-core:116110] [Ruby master Bug#20159] Prism assertion failure even if it is executed with --parser=parse.y
From:
"tompng (tomoya ishida) via ruby-core" <ruby-core@...>
Date:
2024-01-09 10:21:54 UTC
List:
ruby-core #116110
Issue #20159 has been updated by tompng (tomoya ishida).
I found that this is because syntax_suggest is using prism.
It's not caused by iseq loading, I now think this is not a bug.
```
% (echo "<<A+%"; echo "A") > a.rb
% ruby a.rb
Assertion failure
% ruby --disable-gems a.rb
SyntaxError
% ruby --disable-gems -r syntax_suggest a.rb
Assertion failure
```
----------------------------------------
Bug #20159: Prism assertion failure even if it is executed with --parser=parse.y
https://bugs.ruby-lang.org/issues/20159#change-106104
* Author: tompng (tomoya ishida)
* Status: Open
* Priority: Normal
* Assignee: kddnewton (Kevin Newton)
* ruby -v: ruby 3.4.0dev (2024-01-07T16:23:58Z master 8b86d6f0c1) [x86_64-linux]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
Prism fails to parse this code with assertion failed. Reported at https://github.com/ruby/prism/issues/1616
~~~ruby
<<A+%
A
~~~
Ruby exits with assertion failed even if it's run with option `--parser=parse.y`
~~~
# ruby -v
ruby 3.4.0dev (2024-01-07T16:23:58Z master 8b86d6f0c1) [x86_64-linux]
# (echo "<<A+%"; echo "A") > a.rb
# ruby --parser=parse.y a.rb
ruby: prism/util/pm_newline_list.c:42: pm_newline_list_append: Assertion `list->size == 0 || newline_offset > list->offsets[list->size - 1]' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted
~~~
`eval` will correclty result in SyntaxError, `require` and `load` exits with assertion failed.
~~~ruby
# irb
irb(main):001> eval File.read('a.rb')
(irb):1:in `eval': (eval at (irb):1):1: unterminated string meets end of file (SyntaxError)
irb(main):002> load 'a.rb'
prism/util/pm_newline_list.c:42: pm_newline_list_append: Assertion `list->size == 0 || newline_offset > list->offsets[list->size - 1]' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted
~~~
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/