Re: Bug#871514: clamav: FTBFS on mips64el

2017-08-09 Thread Sebastian Andrzej Siewior
control: reassign -1 gcc-7 7.1.0-12
control: affects -1 clamav

On 2017-08-09 16:43:29 [+0200], Aurelien Jarno wrote:
> I got a quick look. It's indeed a regression introduced by GCC 7. It can
> be workarounded by building the file with -O0, but already appears with
> -O1 optimization.
> 
> I got a quick look with gdb and it seems that loading either the rc
> (enum) or infect (bool variable to test it against 0, the load is done 
> with the ld instruction instead of the lw instruction. It means garbage
> from another local variable is loaded into the high 32 bits, which
> causes the comparison against 0 to be false instead of true.

Thanks for looking at this. I reassinged this bug to gcc-7. Would
forwarding the bug gcc upstream with the mbox.i be any help? I could a
label around the check so the comparison could be located in .S easier,
just don't know if this helps.

> Aurelien
> 

Sebastian



Re: Bug#871514: clamav: FTBFS on mips64el

2017-08-09 Thread Aurelien Jarno
On 2017-08-08 20:41, Sebastian Andrzej Siewior wrote:
> On 2017-08-08 20:34:37 [+0200], To sub...@bugs.debian.org wrote:
> …
> > returned (the important part):
> > |LibClamAV debug: parseEmailBody() rc 1 infect 0
> > |LibClamAV debug: parseEmailBody() returning 3
> …
> > The exp build passed with gcc-6_6.4.0-1 [0]. Is there an easy way to
> > downgrade the compiler on eller/porterbox? Or could a porter double
> > check this please?
> 
> on eller in a buster chroot:
> |LibClamAV debug: parseEmailBody() rc 1 infect 0
> |LibClamAV debug: parseEmailBody() returning 1
> 
> further suggestions?

I got a quick look. It's indeed a regression introduced by GCC 7. It can
be workarounded by building the file with -O0, but already appears with
-O1 optimization.

I got a quick look with gdb and it seems that loading either the rc
(enum) or infect (bool variable to test it against 0, the load is done 
with the ld instruction instead of the lw instruction. It means garbage
from another local variable is loaded into the high 32 bits, which
causes the comparison against 0 to be false instead of true.

Aurelien

-- 
Aurelien Jarno  GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net



Re: Bug#871514: clamav: FTBFS on mips64el

2017-08-08 Thread Sebastian Andrzej Siewior
On 2017-08-08 20:34:37 [+0200], To sub...@bugs.debian.org wrote:
…
> returned (the important part):
> |LibClamAV debug: parseEmailBody() rc 1 infect 0
> |LibClamAV debug: parseEmailBody() returning 3
…
> The exp build passed with gcc-6_6.4.0-1 [0]. Is there an easy way to
> downgrade the compiler on eller/porterbox? Or could a porter double
> check this please?

on eller in a buster chroot:
|LibClamAV debug: parseEmailBody() rc 1 infect 0
|LibClamAV debug: parseEmailBody() returning 1

further suggestions?

Sebastian