Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninitialized ivar accessible from closure #6157

Open
ezrast opened this issue Jun 3, 2018 · 0 comments
Open

Uninitialized ivar accessible from closure #6157

ezrast opened this issue Jun 3, 2018 · 0 comments

Comments

@ezrast
Copy link

ezrast commented Jun 3, 2018

This code results in an invalid memory access:

class Klass
  getter attr : String
  def initialize
    ->{ attr[0] }.call
    @attr = "a"
  end
end

Klass.new

https://carc.in/#/r/47bn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants