ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: nobu@ruby-lang.org
To: ruby-core@ruby-lang.org
Subject: [ruby-core:71362] [Ruby trunk - Bug #11663] Segfault when using multiple keywords if the first keyword is invalid
Date: Fri, 06 Nov 2015 00:04:19 +0000	[thread overview]
Message-ID: <redmine.journal-54728.20151106000419.a8b953a86061be77@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-11663.20151105212324@ruby-lang.org

Issue #11663 has been updated by Nobuyoshi Nakada.

Description updated
Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED

----------------------------------------
Bug #11663: Segfault when using multiple keywords if the first keyword is invalid
https://bugs.ruby-lang.org/issues/11663#change-54728

* Author: Sean MacGahan
* Status: Closed
* Priority: Normal
* Assignee: 
* ruby -v: 2.2.3
* Backport: 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED
----------------------------------------
When loading a method with an invalid keyword (such as one that ends in a question mark), a syntax error occurs as is expected. However, when loading a method with multiple keywords, if the first keyword is invalid then a segmentation fault occurs.

```ruby
def foo(arg1?:) end         #=> syntax error
def foo(arg1?:, arg2) end   #=> syntax error (tIDENTIFIER as expected)
def foo(arg1:) end          #=> no syntax error
def foo(arg1:, arg2?:) end  #=> syntax error
def foo(arg1, arg2?:) end   #=> syntax error

def foo(arg1?:, arg2:) end  #=> segfault
def foo(arg1?:, arg2?:) end #=> segfault
```



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

  parent reply	other threads:[~2015-11-05 23:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-11663.20151105212324@ruby-lang.org>
2015-11-05 21:23 ` [ruby-core:71356] [Ruby trunk - Bug #11663] [Open] Segfault when using multiple keywords if the first keyword is invalid smacgaha
2015-11-06  0:04 ` nobu [this message]
2015-11-24 16:03 ` [ruby-core:71656] [Ruby trunk - Bug #11663] " nagachika00

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-54728.20151106000419.a8b953a86061be77@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).