Bug#335881: numerix: FTBFS: Segfaults in tests
Florian Weimer a écrit :
It's at the end of the URL you quoted, but it's incomplete, and the
general approach is wrong. Now, I would byte-code the affected
instructions in the macro and use it in all macro expansions.
like this ?
----------------------------------------------------------------------------------
# corps de boucle à dérouler. taille du code = 24 octets
# entrer avec eax = edx = 1er chiffre de a, CF = 0
#undef BODY
#define BODY(x,y,z) \
adcl x(%ebx,%ecx,4), %eax; \
/* movl y(%esi,%ecx,4), %edx */ .byte 0x8B, 0x54, 0x8E, y; \
movl %eax, x(%edi,%ecx,4); \
/* adcl y(%ebx,%ecx,4), %edx */ .byte 0x13, 0x54, 0x8B, y; \
movl z(%esi,%ecx,4), %eax; \
movl %edx, y(%edi,%ecx,4)
# boucle d addition déroulée pour 16 chiffres
ALIGN(4)
L(begin):
BODY(-4,0,4); BODY(4,8,12); BODY(12,16,20); BODY(20,24,28)
BODY(28,32,36); BODY(36,40,44); BODY(44,48,52); BODY(52,56,60)
----------------------------------------------------------------------------------
This is how I corrected the bug in the future Numerix-0.22. While I can
translate in hexadecimal the whole loop body, I prefer to keep
"high-level-code" wherever it is correctly translated by GAS.
Seen your patch. There remains other unrolled loops in the
multiplication subroutines, affected by the same bug and that will
explain additionnal segfaults. To discover which files are affected do a
"grep -l BODY kernel/n/x86/*.S"
Now there are two possibilities :
1. if you guys at Debian need an urgent fix then there is Numerix-0.21a
available (with nops instead of hand-coded zero displacements). I can
deliver a 0.21b with zero-displacements if necessary.
2. if you don't care about Numerix being buggy then let's live with 0.21
until 0.22 is ready for releasing (probably next Spring). Note that the
bug only affects x86-cpu without sse2 capability, this kind of
processors belongs to the past now.
references:
Numerix-0.21a =
http://pauillac.inria.fr/~quercia/cdrom/bibs/numerix-0.21a.tar.gz
Numerix-0.22 =
http://pauillac.inria.fr/~quercia/cdrom/bibs/numerix-0.22.tar.gz
Regards,
--
Michel Quercia
23 rue de Montchapet, 21000 Dijon
http://michel.quercia.free.fr (maths)
http://pauillac.inria.fr/~quercia (informatique)
mailto:michel.quercia@prepas.org
Reply to: