[CMake] SEGV and signal BUS with cmake-2.8.11 on Solaris 10

Rolf Eike Beer eike at sf-mail.de
Wed May 22 15:58:27 EDT 2013


Paweł Sikora wrote:
> On Sunday 19 of May 2013 20:34:28 Paul Lanken wrote:
> > t at 1 (l at 1) program terminated by signal BUS (invalid address alignment)
> > Current function is cmSHA512_Internal_Transform
> > 
> >  1340                   T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] +
> > 
> > (W512[j] = *data++);
> > (dbx)
> > where
> > current thread: t at 1
> > =>[1] cmSHA512_Internal_Transform(context = 0x100bedee0, data =
> > 0xffffffff7fffb70c), line 1340 in "cm_sha2.c"
> > 
> >   [2] cmSHA512_Update(context = 0x100bedee0, data = 0xffffffff7fffb70c
> > 
> > "\x89PNG^M\n^Z\n", len = 358U), line 1428 in "cm_sha2.c"
> 
> this is a classic sigbus bug - a x86 programmers nightmare on
> sparc/arm/alpha :-) SHA512_Internal_Transform expects sha_word64* buffer
> (8-byte aligned) and gcc emits a LDX opcode on *data accessing... but
> passed data pointer isn't 8-byte aligned :0x...c
> 
> moreover, the cm_sha2.c sources contains strict-aliasing-violationa and gcc
> may emit unexpected code for lines like this:
> 
> cm_sha2.c:      *(sha_word64*)&context->s512.buffer[112] =
> context->s512.bitcount[1]; cm_sha2.c:     
> *(sha_word64*)&context->s512.buffer[120] = context->s512.bitcount[0];

This isn't entirely unexpected:

http://open.cdash.org/viewBuildError.php?type=1&buildid=2912493

Eike
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130522/c790ce48/attachment.pgp>


More information about the CMake mailing list