Bug 259013

Summary: net/cjdns: "Illegal instruction" on CPUs without AVX support
Product: Ports & Packages Reporter: W.J. van der Laan <laanwj>
Component: Individual Port(s)Assignee: Yuri Victorovich <yuri>
Status: New ---    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (yuri)
Priority: ---    
Version: Latest   
Hardware: amd64   
OS: Any   

Description W.J. van der Laan 2021-10-08 20:10:54 UTC
It looks like the precompiled cjdns package assumes that the CPU it is run supports AVX. On older CPUs it will crash with

# /usr/local/bin/cjdroute                                                 
Illegal instruction

Disassembly:

(gdb) disass 0x000000000022ca47,+60                                                     
Dump of assembler code from 0x22ca47 to 0x22ca83:
=> 0x000000000022ca47:  vxorps %xmm0,%xmm0,%xmm0
   0x000000000022ca4b:  vmovaps %ymm0,(%rsp)
…
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2021-10-08 20:22:23 UTC
W.J. van der Laan.

Thank you for reporting this.

cjdns has a new version 21.2 now and it is a rewrite in Rust.
I attempted to build it but it failed: https://github.com/hyperboria/bugs/issues/202

This current issue needs to be retested once 21.2 lands into the ports tree.


Yuri