Bug 259013 - net/cjdns: "Illegal instruction" on CPUs without AVX support
Summary: net/cjdns: "Illegal instruction" on CPUs without AVX support
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-08 20:10 UTC by W.J. van der Laan
Modified: 2021-10-08 20:22 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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