Subject: Re: Bug#764432: FTBFS on sparc, segfault in
TestAlignment



Control: tags -1 patch

On Wed, Oct 08, 2014 at 03:10:57AM +0000, Mike Gabriel wrote:
> Package: freerdp
> Version: 1.1.0~git20140921.1.440916e+dfsg1-2
> Severity: important
>
> Hi Aurelien, hi other porters,
>
> The freerdp version 1.1.0~git20140921.1.440916e+dfsg1-2 still shows FTBFS
> symptoms on Sparc architecture.
>
> """
> [...]
>
> 99% tests passed, 1 tests failed out of 89
>
> Total Test time (real) = 3.07 sec
>
> The following tests FAILED:
> Errors while running CTest
> 16 - TestAlignment (SEGFAULT)
> make[1]: *** [test] Error 8
> Makefile:140: recipe for target 'test' failed
> make[1]: Leaving directory
> '/«BUILDDIR»/freerdp-1.1.0~git20140921.1.440916e+dfsg1/obj-sparc-linux-gnu'
> make: *** [debian/stamp-makefile-check] Error 2
> dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2
> /usr/share/cdbs/1/class/makefile.mk:67: recipe for target
> 'debian/stamp-makefile-check' failed
> """
>
> Any help to dig this out is appreciated...
>
> Thanks,
> Mike
>
>
> --
>
> DAS-NETZWERKTEAM
> mike gabriel, herweg 7, 24357 fleckeby
> fon: +49 (1520) 1976 148
>
> GnuPG Key ID 0x25771B31
> mail: [email protected], http://das-netzwerkteam.de
>
> freeBusy:
>
werkteam.de.xfb">https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb


I had a look at it today. It isn't actually segfaulting, it's getting a
bus error, but somewhere in the testing framework this gets treated the
same as a segfault. The problem lies because the _aligned_offset_malloc
code doesn't ensure that the *header* is aligned, and it then tries to
dereference an unaligned header pointer, if a non-zero offset is given
(well, if you give offset as a multiple of 8, that's fine, since it
won't break the alignment). The attached patch ensures that the header
is always pointer-size-aligned. In fact, since Debian uses gcc, it could
use __alignof__(struct _aligned_meminfo) instead of sizeof(void *), but
that's not portable.

Regards,
James

Attachment: 1013_aligned-meminfo-alignment.patch
Description: Text document



Programming list archiving by: Enterprise Git Hosting