Skip to content

enumerator.c: Add a debug assertion #13571

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

Closed
wants to merge 1 commit into from

Conversation

byroot
Copy link
Member

@byroot byroot commented Jun 10, 2025

I'm tracking down a generic ivar corruption bug, and one possible explanation is that aseq sometimes becomes too_complex. This assertion is to attempt to confirm it.

ruby(sigsegv+0x54) [signal.c:934
ruby(rb_float_noflonum_value+0x0) internal/numeric.h:238
ruby(rb_float_value_inline) internal/numeric.h:241
ruby(flo_to_i) numeric.c:2654
ruby(vm_call0_cfunc_with_frame+0x7c) [0xaaac4f141a74] vm_eval.c:164
ruby(vm_call0_cfunc) vm_eval.c:178
ruby(vm_call0_body) vm_eval.c:229
ruby(vm_call0_cc+0xc8) vm_eval.c:101
ruby(rb_vm_call0+0x3c) vm_eval.c:61
ruby(rb_vm_call_kw) vm_eval.c:326
ruby(rb_check_funcall_default_kw) vm_eval.c:712
ruby(convert_type_with_id+0x8) object.c:3170
ruby(rb_to_integer_with_id_exception) object.c:3285
ruby(rb_to_int) object.c:3315
ruby(rb_num2long+0x68) numeric.c:3218
ruby(rb_num2long_inline+0x8) include/ruby/internal/arithmetic/long.h:272
ruby(rb_arithmetic_sequence_beg_len_step) enumerator.c:3865
ruby(rb_ary_aref1+0x24) array.c:1924
ruby(rb_ary_aref1) array.c:1915
ruby(rb_ary_aref) array.c:1900

I'm tracking down a generic ivar corruption bug, and one possible explanation is
that aseq sometimes becomes too_complex. This assertion is to attempt to confirm it.

```
ruby(sigsegv+0x54) [signal.c:934
ruby(rb_float_noflonum_value+0x0) internal/numeric.h:238
ruby(rb_float_value_inline) internal/numeric.h:241
ruby(flo_to_i) numeric.c:2654
ruby(vm_call0_cfunc_with_frame+0x7c) [0xaaac4f141a74] vm_eval.c:164
ruby(vm_call0_cfunc) vm_eval.c:178
ruby(vm_call0_body) vm_eval.c:229
ruby(vm_call0_cc+0xc8) vm_eval.c:101
ruby(rb_vm_call0+0x3c) vm_eval.c:61
ruby(rb_vm_call_kw) vm_eval.c:326
ruby(rb_check_funcall_default_kw) vm_eval.c:712
ruby(convert_type_with_id+0x8) object.c:3170
ruby(rb_to_integer_with_id_exception) object.c:3285
ruby(rb_to_int) object.c:3315
ruby(rb_num2long+0x68) numeric.c:3218
ruby(rb_num2long_inline+0x8) include/ruby/internal/arithmetic/long.h:272
ruby(rb_arithmetic_sequence_beg_len_step) enumerator.c:3865
ruby(rb_ary_aref1+0x24) array.c:1924
ruby(rb_ary_aref1) array.c:1915
ruby(rb_ary_aref) array.c:1900
```
@byroot byroot closed this Jun 10, 2025
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

Successfully merging this pull request may close these issues.

1 participant