[#86520] [Ruby trunk Bug#14681] `syswrite': stream closed in another thread (IOError) — samuel@...
Issue #14681 has been reported by ioquatix (Samuel Williams).
3 messages
2018/04/12
[#86755] [Ruby trunk Feature#14723] [WIP] sleepy GC — normalperson@...
Issue #14723 has been reported by normalperson (Eric Wong).
6 messages
2018/04/29
[ruby-core:86555] [Ruby trunk Bug#14690] Invalid CMDARG state after command_args followed by tLBRACE_ARG
From:
ibylich@...
Date:
2018-04-17 01:27:43 UTC
List:
ruby-core #86555
Issue #14690 has been updated by ibylich (Ilya Bylich).
Thank you!
----------------------------------------
Bug #14690: Invalid CMDARG state after command_args followed by tLBRACE_ARG
https://bugs.ruby-lang.org/issues/14690#change-71496
* Author: ibylich (Ilya Bylich)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.6.0dev (2018-04-15 trunk 63161) [x86_64-darwin17]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
~~~ ruby
assert_valid_syntax('let () { m(a) do; end }')
~~~
The patch that fixes it is attached.
tLBRACE_ARG does "CMDARG_PUSH(0)" in the lexer and then the parser leaves the "command_args" rule. The parser does "CMDARG_POP" to remove 1 from the top of the "CMDARG", but the thing here is that there's a 0 on top (the one pushed by tLBRACE_ARG) and the parser pops a wrong value. If the next token is tLBRACE_ARG the parser should pop 2nd top value (like "tmp = pop; pop; push(tmp)").
From what I understand that's the only token that can mutate "CMDARG" in the lexer and that can be emitted after command args.
I've found it during stress-testing a parser gem and that's the only issue that I was able to find so far.
---Files--------------------------------
cmdarg_in_command_args_followed_by_tlbrace_arg.patch (1.18 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>