Paweł Sikora wrote:
> On Sunday 19 of May 2013 20:34:28 Paul Lanken wrote:
> > t@1 (l@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@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
-- 

Attachment: signature.asc
Description: This is a digitally signed message part.

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to