Bug#725253: libgf2x1: Illegal instruction (pclmul ?) on pre-2010 CPU

apterium apterium at gmail.com
Thu Oct 3 11:07:22 UTC 2013


Package: libgf2x1
Version: 1.1-1
Severity: important

Dear Maintainer,

I'm compiling the new version of NTL (6.0.0, www.shoup.net/ntl/). 
I've activated gf2x use instead of NTL specifics.
When running make check, the check fails with the following answer : 

running tests...make: *** [check] Illegal instruction

Indeed in dmesg, there is the following message : 
[324010.548565] traps: QuickTest[22331] trap invalid opcode ip:2ac57a2ffddc sp:7fffabddd268 error:0 in libgf2x.so.1.0.0[2ac57a2fe000+b000]

It seems to me that the illegal instruction is in libgf2x.so

A simple objdump -d /usr/lib/x86_64-linux-gnu/libgf2x.so |less seems to show that gf2x uses thepclmullqlqdq  instruction, which is not available on my CPU (Intel(R) Core(TM) i7 CPU Q 840).

I don't have the technical knowledge to see if the instruction is used only in specific code path that detect the availability of the pclmul (carry-less multiplication) instruction set on the CPU.

However, it seems that by default, the compilation of gf2x by debian does activate the pclmul instruction use.

I've verified it by doing the following commands : 
apt-get source libfg2x-dev
cd gf2x-1.1
dpkg-buildpackage -rfakeroot -us -uc 

and doing a "ps aux |grep configure " when the configuration is done by the script ; this gives : 
24883 13.0  0.0  10508  2604 pts/23   S+   12:53   0:00 /bin/bash ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking

It seems that following configure option : 
--enable-pclmul Turn on pclmul code (default is yes)
is NOT turned off. 

I've added (one of) my /proc/cpuinfo CPU details at the end of the report


I apologize for the trouble, especially if it would turn out that I'm completely mistaken, and I thank you for your attention.






-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.11-trunk-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libgf2x1 depends on:
ii  libc6              2.17-93
ii  multiarch-support  2.17-93

libgf2x1 recommends no packages.

libgf2x1 suggests no packages.

-- no debconf information

processor       : 5
vendor_id       : GenuineIntel
cpu family      : 6
model           : 30
model name      : Intel(R) Core(TM) i7 CPU       Q 840  @ 1.87GHz
stepping        : 5
microcode       : 0x6
cpu MHz         : 1199.000
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 2
cpu cores       : 4
apicid          : 5
initial apicid  : 5
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips        : 3724.37
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:



More information about the debian-science-maintainers mailing list