New comment by tornaria on void-packages repository https://github.com/void-linux/void-packages/pull/34030#issuecomment-1001036749 Comment: Using `sage -gdb` I can get a backtrace which shows the segfault has something to do with realloc, but I don't know how to get a good backtrace, even though I built and installed `musl-dbg`. I'm guessing all those `??` are traces in musl libc (???) It seems only factorial between 27 and 35 call realloc so those are the values failing (makes sense because of the default thresholds). ``` $ sage -gdb [...] sage: Integer.factorial(27) [LWP 343 exited] Thread 1 "python" received signal SIGSEGV, Segmentation fault. 0x00007ffff7f77886 in __libc_realloc () from /lib/ld-musl-x86_64.so.1 (gdb) backtrace #0 0x00007ffff7f77886 in __libc_realloc () from /lib/ld-musl-x86_64.so.1 #1 0x00007fff62d628d0 in ?? () #2 0x0000000000000001 in ?? () #3 0x00007fff62b91930 in ?? () #4 0x00007fff62d95f40 in ?? () #5 0x0000000000000018 in ?? () #6 0x0000000000000017 in ?? () #7 0x00007fff62d95f40 in ?? () #8 0x00007fff62d95f40 in ?? () #9 0x00007fff62bd9d50 in ?? () #10 0x00007fffafe986ec in sig_realloc (__pyx_v_size=140734942737072, __pyx_v_ptr=) at build/cythonized/sage/ext/memory.c:1816 #11 __pyx_f_4sage_3ext_6memory_sage_sig_realloc (__pyx_v_ptr=, __pyx_v_old_size=, __pyx_v_new_size=140734942737072) at build/cythonized/sage/ext/memory.c:1446 #12 0x00007ffff49a5c5e in __gmpz_realloc (m=0x55555556cc70, new_alloc=new_alloc@entry=3) at realloc.c:67 #13 0x00007ffff49a26b2 in __gmpz_mul_2exp (r=r@entry=0x7fff62d95f40, u=0x7fff6844f2b8, u@entry=0x7fff62d95f40, cnt=23) at mul_2exp.c:51 #14 0x00007ffff499c42a in __gmpz_fac_ui (x=x@entry=0x7fff62d95f40, n=) at fac_ui.c:103 #15 0x00007fffb0b6e5b4 in __pyx_pf_4sage_5rings_7integer_7Integer_168factorial (__pyx_v_self=) at build/cythonized/sage/rings/integer.c:29395 ```