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

Fix segfault in tkstr_to_float on Ruby 3.4 #60

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

jeremyevans
Copy link
Contributor

I'm not sure why this fails on Ruby 3.4, but without this, I get the following failure:

$ ruby example.rb
/usr/local/lib/ruby/gems/3.4/gems/tk-0.5.0/lib/tk/event.rb:518: [BUG] Segmentation fault at 0x0000000000000014
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x86_64-openbsd]

-- Control frame information -----------------------------------------------
c:0014 p:---- s:0105 e:000104 CFUNC  :num_or_str
c:0013 p:---- s:0102 e:000101 CFUNC  :call
c:0012 p:---- s:0099 e:000098 CFUNC  :scan_args
...

I'm not sure tkstr_to_int is effected, but since it makes the code simpler, I switched it at the same time.

I'm not sure why this fails on Ruby 3.4, but without this, I get
the following failure:

```
$ ruby example.rb
/usr/local/lib/ruby/gems/3.4/gems/tk-0.5.0/lib/tk/event.rb:518: [BUG] Segmentation fault at 0x0000000000000014
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x86_64-openbsd]

-- Control frame information -----------------------------------------------
c:0014 p:---- s:0105 e:000104 CFUNC  :num_or_str
c:0013 p:---- s:0102 e:000101 CFUNC  :call
c:0012 p:---- s:0099 e:000098 CFUNC  :scan_args
...
```

I'm not sure tkstr_to_int is effect, but since it makes the code
simpler, I switched it at the same time.
@jeremyevans jeremyevans merged commit 0a349ba into ruby:master Jan 8, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant