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

Segmentation fault when using Oj as adapter #217

Open
tientt-holistics opened this issue Jun 25, 2024 · 1 comment
Open

Segmentation fault when using Oj as adapter #217

tientt-holistics opened this issue Jun 25, 2024 · 1 comment

Comments

@tientt-holistics
Copy link

Trace:

irb(main):001:0> require 'oj';
=> true
irb(main):002:0> require 'multi_json'
=> true
irb(main):003:1* class A
irb(main):004:1*   def to_json; end
irb(main):005:0> end
=> :to_json
irb(main):006:0> MultiJson.dump(A.new)
/home/natton/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/multi_json-1.15.0/lib/multi_json/adapters/oj.rb:56: [BUG] Segmentation fault at 0x0000000000000008
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux]                                                 
                                                                              

System:

  • gem multi-json version 1.15.0
  • gem oj version version 3.13.23
@tientt-holistics
Copy link
Author

Using Oj.dump can still dump to a json string

Oj.dump(A.new)
=> "{\"^o\":\"A\"}"

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

1 participant