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

Curl 7.71 NullPointerError (Arch Linux) #169

Open
reedlaw opened this issue Jun 29, 2020 · 2 comments
Open

Curl 7.71 NullPointerError (Arch Linux) #169

reedlaw opened this issue Jun 29, 2020 · 2 comments

Comments

@reedlaw
Copy link

reedlaw commented Jun 29, 2020

I get this error with the latest libcurl (v7.71):

     FFI::NullPointerError:
       invalid memory read at address=0x0000000000000000
     # /home/reed/.gem/ruby/2.6.0/gems/ffi-1.12.2/lib/ffi/pointer.rb:55:in `get_string'
     # /home/reed/.gem/ruby/2.6.0/gems/ffi-1.12.2/lib/ffi/pointer.rb:55:in `read_string'
     # /home/reed/.gem/ruby/2.6.0/gems/ethon-0.10.1/lib/ethon/easy.rb:285:in `escape'
     # /home/reed/.gem/ruby/2.6.0/gems/ethon-0.10.1/lib/ethon/easy/queryable.rb:35:in `block (2 levels) in to_s'
     # /home/reed/.gem/ruby/2.6.0/gems/ethon-0.10.1/lib/ethon/easy/queryable.rb:35:in `map'
     # /home/reed/.gem/ruby/2.6.0/gems/ethon-0.10.1/lib/ethon/easy/queryable.rb:35:in `block in to_s'
     # /home/reed/.gem/ruby/2.6.0/gems/ethon-0.10.1/lib/ethon/easy/queryable.rb:31:in `map'
     # /home/reed/.gem/ruby/2.6.0/gems/ethon-0.10.1/lib/ethon/easy/queryable.rb:31:in `to_s'
     # /home/reed/.gem/ruby/2.6.0/gems/ethon-0.10.1/lib/ethon/easy/http/postable.rb:24:in `set_form'
     # /home/reed/.gem/ruby/2.6.0/gems/ethon-0.10.1/lib/ethon/easy/http/actionable.rb:101:in `setup'
     # /home/reed/.gem/ruby/2.6.0/gems/ethon-0.10.1/lib/ethon/easy/http/post.rb:16:in `setup'
     # /home/reed/.gem/ruby/2.6.0/gems/ethon-0.10.1/lib/ethon/easy/http.rb:39:in `http_request'
     # /home/reed/.gem/ruby/2.6.0/gems/typhoeus-1.3.0/lib/typhoeus/easy_factory.rb:81:in `get'
     # /home/reed/.gem/ruby/2.6.0/gems/typhoeus-1.3.0/lib/typhoeus/request.rb:130:in `url'

Downgrading to v7.70 fixes it. Anyone else experience this?

@NARKOZ
Copy link

NARKOZ commented Sep 17, 2020

Reproduced with libcurl 7.72.0 and 7.71.0

@mbloch1986
Copy link

mbloch1986 commented Sep 23, 2020

Thought it's worth sharing, I'm experiencing the same with typheus 1.4.0, ffi 1.13.1 &ethon-0.12.0. Even downgrading any of those libraries don't fix the problem.

So far the results of my investigations is that the error happens if an empty string "" gets passed to ffi in lib/ffi/pointer.rb:55
:

In my case the value for pair at line 31 in lib/ethon/easy/queryable.rbhttps://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L31 is as follows

[:deleteAuthorizable, ""]

The only way how I can get it to work is to use non empty strings, which isn't possible for me :(.

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

No branches or pull requests

3 participants