View Single Post
Old 2021-01-14, 18:28   #1
2147483647
 
Dec 2016

228 Posts
Default Yafu segmentation fault

I upgraded to Linux Mint 20.1 yesterday and I just tried to rebuild yafu and I'm getting a segmentation fault (in fact, the old binary that worked on mint 19.1 also segfaults now). I'm using the latest snapshot on sourceforge (r395) and the old binary was r378. To build, I mostly followed the instructions here. I'm using gmp 6.2.1, gmp-ecm 7.0.4, and msieve r1036.

Stack trace from gdb after running factor(10^100+1):

Code:
#0  0x00005555555b78cd in mpz_set_64 (dest=0x7fffffffd370, src=73)
    at arith/arith0.c:81
#1  0x0000555555588b6b in zTrial (fobj=0x555555766bd0) at factor/trialdiv.c:66
#2  0x000055555557ec84 in do_work (method=state_trialdiv, 
    fwork=0x7fffffffd4b0, b=0x7fffffffd640, fobj=0x555555766bd0)
    at factor/factor_common.c:949
#3  0x00005555555823f8 in factor (fobj=0x555555766bd0)
    at factor/factor_common.c:2408
#4  0x0000555555570ddf in feval (func=7, nargs=1, fobj=0x555555766bd0)
    at top/calc.c:1326
#5  0x0000555555570616 in calc (in=0x7fffffffdda0, fobj=0x555555766bd0)
    at top/calc.c:1077
#6  0x000055555556fab9 in process_expression (input_exp=0x5555557642a0 "ans", 
    fobj=0x555555766bd0) at top/calc.c:660
#7  0x0000555555565608 in main (argc=1, argv=0x7fffffffdfa8)
    at top/driver.c:301
Does anyone know how to fix this?

Edit: It seems like a bug with a successful trial division. When I try to a factor a number with no small prime factors, it works fine.

Edit 2: siqs(95442572017298574098337713301010381254972520112407276434678638815347074607638583667) also crashes in the same place:

Code:
#0  0x00005555555b78cd in mpz_set_64 (dest=0x7ffff58e25d0, src=250663328318941)
    at arith/arith0.c:81
#1  0x000055555558402b in sp_shanks_loop (N=0x7ffff7933088, 
    fobj=0x555555766bd0) at factor/squfof.c:145
#2  0x000055555559157b in trial_divide_Q_siqs (report_num=2, parity=1 '\001', 
    poly_id=0, bnum=8, sconf=0x5555557792d0, dconf=0x7ffff7933010)
    at factor/qs/tdiv.c:218
#3  0x00005555555942a1 in check_relations_siqs_16 (blocknum=8, 
    parity=1 '\001', sconf=0x5555557792d0, dconf=0x7ffff7933010)
    at factor/qs/tdiv_scan.c:967
#4  0x00005555555a1f8f in process_poly (ptr=0x555555779d88)
    at factor/qs/SIQS.c:954
#5  0x00005555555a1b79 in worker_thread_main (thread_data=0x555555779d88)
    at factor/qs/SIQS.c:813
#6  0x00007ffff7f15609 in start_thread (arg=<optimised out>)
    at pthread_create.c:477
#7  0x00007ffff7ce7293 in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Last fiddled with by 2147483647 on 2021-01-14 at 19:01 Reason: siqs crash
2147483647 is offline   Reply With Quote