ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:69393] [Ruby trunk - Bug #11192] [Open] capture group special variable with large index invokes UB
       [not found] <redmine.issue-11192.20150528142548@ruby-lang.org>
@ 2015-05-28 14:25 ` cremno
  2015-06-30  4:15 ` [ruby-core:69803] [Ruby trunk - Bug #11192] " usa
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: cremno @ 2015-05-28 14:25 UTC (permalink / raw)
  To: ruby-core

Issue #11192 has been reported by cremno phobia.

----------------------------------------
Bug #11192: capture group special variable with large index invokes UB
https://bugs.ruby-lang.org/issues/11192

* Author: cremno phobia
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
~~~
$ ruby --dump=parsetree -e "$9999999999"
###########################################################
## Do NOT use this node dump for any purpose other than  ##
## debug and research.  Compatibility is not guaranteed. ##
###########################################################

# @ NODE_SCOPE (line: 1)
# +- nd_tbl: (empty)
# +- nd_args:
# |   (null node)
# +- nd_body:
#     @ NODE_NTH_REF (line: 1)
#     +- nd_nth: $1410065407
~~~

The culprit is [this line](https://github.com/ruby/ruby/blob/4d059bf9f5f10f3d3088de49fc87e5555db7770d/parse.y#L7673) in `parse.y` which contains a call to `atoi()`.

A simple, non-intrusive fix could be calling a function with well-defined behavior when the resulting value can't be represented instead (such as `strtoul()`) and of course also adding a range check. But perhaps a syntax error is undesired here.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-core:69803] [Ruby trunk - Bug #11192] capture group special variable with large index invokes UB
       [not found] <redmine.issue-11192.20150528142548@ruby-lang.org>
  2015-05-28 14:25 ` [ruby-core:69393] [Ruby trunk - Bug #11192] [Open] capture group special variable with large index invokes UB cremno
@ 2015-06-30  4:15 ` usa
  2015-07-03  9:39 ` [ruby-core:69856] " usa
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: usa @ 2015-06-30  4:15 UTC (permalink / raw)
  To: ruby-core

Issue #11192 has been updated by Usaku NAKAMURA.

Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: WONTFIX, 2.1: REQUIRED, 2.2: REQUIRED

----------------------------------------
Bug #11192: capture group special variable with large index invokes UB
https://bugs.ruby-lang.org/issues/11192#change-53198

* Author: cremno phobia
* Status: Closed
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.0.0: WONTFIX, 2.1: REQUIRED, 2.2: REQUIRED
----------------------------------------
~~~
$ ruby --dump=parsetree -e "$9999999999"
###########################################################
## Do NOT use this node dump for any purpose other than  ##
## debug and research.  Compatibility is not guaranteed. ##
###########################################################

# @ NODE_SCOPE (line: 1)
# +- nd_tbl: (empty)
# +- nd_args:
# |   (null node)
# +- nd_body:
#     @ NODE_NTH_REF (line: 1)
#     +- nd_nth: $1410065407
~~~

The culprit is [this line](https://github.com/ruby/ruby/blob/4d059bf9f5f10f3d3088de49fc87e5555db7770d/parse.y#L7673) in `parse.y` which contains a call to `atoi()`.

A simple, non-intrusive fix could be calling a function with well-defined behavior when the resulting value can't be represented instead (such as `strtoul()`) and of course also adding a range check. But perhaps a syntax error is undesired here.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-core:69856] [Ruby trunk - Bug #11192] capture group special variable with large index invokes UB
       [not found] <redmine.issue-11192.20150528142548@ruby-lang.org>
  2015-05-28 14:25 ` [ruby-core:69393] [Ruby trunk - Bug #11192] [Open] capture group special variable with large index invokes UB cremno
  2015-06-30  4:15 ` [ruby-core:69803] [Ruby trunk - Bug #11192] " usa
@ 2015-07-03  9:39 ` usa
  2015-07-03 19:31 ` [ruby-core:69861] " nagachika00
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: usa @ 2015-07-03  9:39 UTC (permalink / raw)
  To: ruby-core

Issue #11192 has been updated by Usaku NAKAMURA.

Backport changed from 2.0.0: WONTFIX, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: WONTFIX, 2.1: DONE, 2.2: REQUIRED

ruby_2_1 r51122 merged revision(s) 50671.

----------------------------------------
Bug #11192: capture group special variable with large index invokes UB
https://bugs.ruby-lang.org/issues/11192#change-53257

* Author: cremno phobia
* Status: Closed
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.0.0: WONTFIX, 2.1: DONE, 2.2: REQUIRED
----------------------------------------
~~~
$ ruby --dump=parsetree -e "$9999999999"
###########################################################
## Do NOT use this node dump for any purpose other than  ##
## debug and research.  Compatibility is not guaranteed. ##
###########################################################

# @ NODE_SCOPE (line: 1)
# +- nd_tbl: (empty)
# +- nd_args:
# |   (null node)
# +- nd_body:
#     @ NODE_NTH_REF (line: 1)
#     +- nd_nth: $1410065407
~~~

The culprit is [this line](https://github.com/ruby/ruby/blob/4d059bf9f5f10f3d3088de49fc87e5555db7770d/parse.y#L7673) in `parse.y` which contains a call to `atoi()`.

A simple, non-intrusive fix could be calling a function with well-defined behavior when the resulting value can't be represented instead (such as `strtoul()`) and of course also adding a range check. But perhaps a syntax error is undesired here.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-core:69861] [Ruby trunk - Bug #11192] capture group special variable with large index invokes UB
       [not found] <redmine.issue-11192.20150528142548@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2015-07-03  9:39 ` [ruby-core:69856] " usa
@ 2015-07-03 19:31 ` nagachika00
  2015-07-03 19:33 ` [ruby-core:69862] " nagachika00
  2015-07-03 19:58 ` [ruby-core:69865] " nagachika00
  5 siblings, 0 replies; 6+ messages in thread
From: nagachika00 @ 2015-07-03 19:31 UTC (permalink / raw)
  To: ruby-core

Issue #11192 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.0.0: WONTFIX, 2.1: DONE, 2.2: REQUIRED to 2.0.0: WONTFIX, 2.1: DONE, 2.2: DONE

Backported into `ruby_2_2` branch at r51132.

----------------------------------------
Bug #11192: capture group special variable with large index invokes UB
https://bugs.ruby-lang.org/issues/11192#change-53265

* Author: cremno phobia
* Status: Closed
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.0.0: WONTFIX, 2.1: DONE, 2.2: DONE
----------------------------------------
~~~
$ ruby --dump=parsetree -e "$9999999999"
###########################################################
## Do NOT use this node dump for any purpose other than  ##
## debug and research.  Compatibility is not guaranteed. ##
###########################################################

# @ NODE_SCOPE (line: 1)
# +- nd_tbl: (empty)
# +- nd_args:
# |   (null node)
# +- nd_body:
#     @ NODE_NTH_REF (line: 1)
#     +- nd_nth: $1410065407
~~~

The culprit is [this line](https://github.com/ruby/ruby/blob/4d059bf9f5f10f3d3088de49fc87e5555db7770d/parse.y#L7673) in `parse.y` which contains a call to `atoi()`.

A simple, non-intrusive fix could be calling a function with well-defined behavior when the resulting value can't be represented instead (such as `strtoul()`) and of course also adding a range check. But perhaps a syntax error is undesired here.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-core:69862] [Ruby trunk - Bug #11192] capture group special variable with large index invokes UB
       [not found] <redmine.issue-11192.20150528142548@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2015-07-03 19:31 ` [ruby-core:69861] " nagachika00
@ 2015-07-03 19:33 ` nagachika00
  2015-07-03 19:58 ` [ruby-core:69865] " nagachika00
  5 siblings, 0 replies; 6+ messages in thread
From: nagachika00 @ 2015-07-03 19:33 UTC (permalink / raw)
  To: ruby-core

Issue #11192 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.0.0: WONTFIX, 2.1: DONE, 2.2: DONE to 2.0.0: WONTFIX, 2.1: DONE, 2.2: REQUIRED

sorry, previous commet is a mistake.

----------------------------------------
Bug #11192: capture group special variable with large index invokes UB
https://bugs.ruby-lang.org/issues/11192#change-53266

* Author: cremno phobia
* Status: Closed
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.0.0: WONTFIX, 2.1: DONE, 2.2: REQUIRED
----------------------------------------
~~~
$ ruby --dump=parsetree -e "$9999999999"
###########################################################
## Do NOT use this node dump for any purpose other than  ##
## debug and research.  Compatibility is not guaranteed. ##
###########################################################

# @ NODE_SCOPE (line: 1)
# +- nd_tbl: (empty)
# +- nd_args:
# |   (null node)
# +- nd_body:
#     @ NODE_NTH_REF (line: 1)
#     +- nd_nth: $1410065407
~~~

The culprit is [this line](https://github.com/ruby/ruby/blob/4d059bf9f5f10f3d3088de49fc87e5555db7770d/parse.y#L7673) in `parse.y` which contains a call to `atoi()`.

A simple, non-intrusive fix could be calling a function with well-defined behavior when the resulting value can't be represented instead (such as `strtoul()`) and of course also adding a range check. But perhaps a syntax error is undesired here.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-core:69865] [Ruby trunk - Bug #11192] capture group special variable with large index invokes UB
       [not found] <redmine.issue-11192.20150528142548@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2015-07-03 19:33 ` [ruby-core:69862] " nagachika00
@ 2015-07-03 19:58 ` nagachika00
  5 siblings, 0 replies; 6+ messages in thread
From: nagachika00 @ 2015-07-03 19:58 UTC (permalink / raw)
  To: ruby-core

Issue #11192 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.0.0: WONTFIX, 2.1: DONE, 2.2: REQUIRED to 2.0.0: WONTFIX, 2.1: DONE, 2.2: DONE

Backported into `ruby_2_2` at r51134.

----------------------------------------
Bug #11192: capture group special variable with large index invokes UB
https://bugs.ruby-lang.org/issues/11192#change-53269

* Author: cremno phobia
* Status: Closed
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.0.0: WONTFIX, 2.1: DONE, 2.2: DONE
----------------------------------------
~~~
$ ruby --dump=parsetree -e "$9999999999"
###########################################################
## Do NOT use this node dump for any purpose other than  ##
## debug and research.  Compatibility is not guaranteed. ##
###########################################################

# @ NODE_SCOPE (line: 1)
# +- nd_tbl: (empty)
# +- nd_args:
# |   (null node)
# +- nd_body:
#     @ NODE_NTH_REF (line: 1)
#     +- nd_nth: $1410065407
~~~

The culprit is [this line](https://github.com/ruby/ruby/blob/4d059bf9f5f10f3d3088de49fc87e5555db7770d/parse.y#L7673) in `parse.y` which contains a call to `atoi()`.

A simple, non-intrusive fix could be calling a function with well-defined behavior when the resulting value can't be represented instead (such as `strtoul()`) and of course also adding a range check. But perhaps a syntax error is undesired here.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-03 19:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-11192.20150528142548@ruby-lang.org>
2015-05-28 14:25 ` [ruby-core:69393] [Ruby trunk - Bug #11192] [Open] capture group special variable with large index invokes UB cremno
2015-06-30  4:15 ` [ruby-core:69803] [Ruby trunk - Bug #11192] " usa
2015-07-03  9:39 ` [ruby-core:69856] " usa
2015-07-03 19:31 ` [ruby-core:69861] " nagachika00
2015-07-03 19:33 ` [ruby-core:69862] " nagachika00
2015-07-03 19:58 ` [ruby-core:69865] " nagachika00

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).