diff options
author | Aaron Patterson <[email protected]> | 2021-07-12 15:38:56 -0700 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:37 -0400 |
commit | 2440fafba00b6646b312a0c74798523bfa44bfe9 (patch) | |
tree | 6de6ab877c2cf9a9dca3841e21c4b05748cdfd06 /yjit_iface.c | |
parent | dc8aca1883ebc76e02ff7097405d48f489c3535f (diff) |
rb_struct_define_under needs a trailing NULL
The last parameter to rb_struct_define_under needs to be NULL otherwise
we can get a SEGV.
Diffstat (limited to 'yjit_iface.c')
-rw-r--r-- | yjit_iface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yjit_iface.c b/yjit_iface.c index 76eb4876c8..1cb455e0c3 100644 --- a/yjit_iface.c +++ b/yjit_iface.c @@ -1035,7 +1035,7 @@ rb_yjit_init(struct rb_yjit_options *options) rb_define_method(cYjitDisasm, "disasm", yjit_disasm, 2); cYjitDisasmInsn = rb_struct_define_under(cYjitDisasm, "Insn", "address", "mnemonic", "op_str", NULL); #if RUBY_DEBUG - cYjitCodeComment = rb_struct_define_under(cYjitDisasm, "Comment", "address", "comment"); + cYjitCodeComment = rb_struct_define_under(cYjitDisasm, "Comment", "address", "comment", NULL); #endif #endif |