Project

General

Profile

Actions

Bug #11566

closed

Segfault when enumerating from a bad constructor.

Added by 0x0dea (D.E. Akers) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0dev (2015-10-04 trunk 52020) [x86_64-linux]
[ruby-core:<unknown>]

Description

Enumerator.new(&:foo).to_a

This should raise a NoMethodError as it does for older Rubies, but the recent modifications to the internals of Symbol#to_proc seem to have elided the CFP information necessary to realize the NME.

I've attached a core dump which ultimately blames the VM_EP_LEP_P() macro for dereferencing a null pointer.

#define VM_EP_LEP_P(ep)     VM_ENVVAL_BLOCK_PTR_P((ep)[0])

Aside from observing that the block must not have an "environment" where it expected to find one, I am regrettably unable to provide any further information as to the nature or mitigation of this issue.


Files

core (3.96 KB) core 0x0dea (D.E. Akers), 10/05/2015 01:55 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0