[Debichem-devel] chemfp: New upstream release 1.1p1 available

Michael Banck mbanck at debian.org
Sun Mar 10 15:59:46 UTC 2013


Hi,

On Sun, Mar 10, 2013 at 04:26:37PM +0100, Michael Banck wrote:
> On Sun, Mar 10, 2013 at 04:20:54PM +0100, Michael Banck wrote:
> > Disassembling that routine shows it uses a SSSE3 routine, apparently
> > without guarding against a CPUID check:
> > 
> > |(gdb) disassemble
> > |Dump of assembler code for function chemfp_count_tanimoto_arena_single:
> > [...]
> > |0xb78ccbf6 <chemfp_count_tanimoto_arena_single+422>:    pshufd $0x0,%xmm1,%xmm0
> > [...]
> > |End of assembler dump.
> 
> Bah, I misread this, pshufd is SSE2 - pshufb would be SSSE3 apparently.

OK, I had another look, and with some help I got:

(gdb) p $pc
$2 = (void (*)()) 0xb78ccd47 <chemfp_count_tanimoto_arena_single+759>

line 759 in the disassembled routine is:

0xb78ccd47 <chemfp_count_tanimoto_arena_single+759>:    fisttpl
-0x50(%ebp)

That instruction converts float to integer, which is in line with the
faulting code:

      start_target_popcount = (int)(query_popcount * threshold);

I think the right approach would be to only pass -mssse3 to the (few I
guess) files which include the CPUID-guards and really need it.

If I remove -mssse3 from the copt variable in setup.py and just compile
src/popcount_* manually with -mssse3, the testsuite no longer fails with
SIGILL.  I am not that much of a python expert to come up with an
elegant patch for setup.py right now, though.


Cheers,

Michael



More information about the Debichem-devel mailing list