From: shyouhei@... Date: 2019-03-11T00:34:55+00:00 Subject: [ruby-core:91738] [Ruby trunk Bug#15651] infinite loop in int_pow Issue #15651 has been updated by shyouhei (Shyouhei Urabe). ``` zsh % gdb --args ./miniruby -ve '[1].repeated_permutation(1).size' GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./miniruby...done. (gdb) run Starting program: /home/shyouhei/data/build/ruby@gcc-8/trunk@git/miniruby -ve \[1\].repeated_permutation\(1\).size [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". ruby 2.7.0dev (2019-03-05 trunk 67168) [x86_64-linux] ^C Program received signal SIGINT, Interrupt. int_pow (x=1, y=0) at /trunk/numeric.c:3999 3999 if (!FIT_SQRT_LONG(x)) { (gdb) bt #0 int_pow (x=1, y=0) at /trunk/numeric.c:3999 #1 0x000055555579000c in vm_call_cfunc_with_frame (ci=0x555555bd2c80, cc=, calling=0x555555ae68c0, reg_cfp=0x7ffff7fd3fa0, ec=0x555555ab54f8) at /trunk/vm_insnhelper.c:2006 #2 vm_call_cfunc () at /trunk/vm_insnhelper.c:2022 #3 0x0000555555794759 in vm_call_method_each_type.part () at /trunk/vm_insnhelper.c:2344 #4 0x0000555555794d12 in vm_call_method_each_type (cc=, ci=, calling=, cfp=, ec=) at /trunk/vm_insnhelper.c:2468 #5 vm_call_method (cc=, ci=, calling=, cfp=, ec=) at /trunk/vm_insnhelper.c:2496 #6 vm_call_method (ec=0x555555ab54f8, cfp=0x7ffff7fd3fa0, calling=, ci=, cc=) at /trunk/vm_insnhelper.c:2463 #7 0x000055555579b580 in vm_sendish (method_explorer=, block_handler=, cc=, ci=, reg_cfp=, ec=) at /trunk/vm_insnhelper.c:3350 #8 vm_exec_core () at ../../../src/trunk/insns.def:782 #9 0x00005555557929c6 in rb_vm_exec () at /trunk/vm.c:1897 #10 0x00005555557a40ea in rb_iseq_eval_main (iseq=) at /trunk/vm.c:2156 #11 0x00005555556087cf in ruby_exec_internal (n=0x555555ad6b00) at /trunk/eval.c:261 #12 0x000055555560c74b in ruby_exec_node (n=) at /trunk/eval.c:325 #13 ruby_run_node (n=) at /trunk/eval.c:317 #14 0x000055555557b0ef in main (argc=, argv=) at /trunk/main.c:42 (gdb) ``` ---------------------------------------- Bug #15651: infinite loop in int_pow https://bugs.ruby-lang.org/issues/15651#change-77014 * Author: pb (pumbur _) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- `[1].repeated_permutation(1).size` goes into infinite loop. -- https://bugs.ruby-lang.org/ Unsubscribe: