Android gpg-agent crashes in libgcrypt when signing, decrypting, importing secret keys

Hans-Christoph Steiner hans at
Mon Jan 20 16:39:08 CET 2014

On 01/19/2014 04:25 AM, Jussi Kivilinna wrote:
> On 19.01.2014 06:08, Hans-Christoph Steiner wrote:
>> On 01/18/2014 06:31 AM, Jussi Kivilinna wrote:
>>> On 17.01.2014 20:34, Hans-Christoph Steiner wrote:
>>>> On GPG for Android, I've updated to the latest libgcrypt in master (or close
>>>> to it, its commit 4b7db51ad5d1bf98fd08ca3048f258059eca61a4).  Now it seems
>>>> that any operation that needs a passphrase is crashing somewhere in libgcrypt.
>>>>  I've tried building with auto-detection of CPU which enables Padlock, Intelt
>>>> DRNG, and NEON.  I also tried with --disable-padlock-support
>>>> --disable-drng-support --disable-neon-support, and seemed to get the same thing.
>>>> I've also tried running gpg-agent with and without --enable-ssh-support, and
>>>> same result each time.
>>>> Here's the basic backtrace:
>>> <..snip..>
>>>> From the bug report in our tracker, you can download the complete build log, a
>>>> debug log from the Android app, a log from gpg-agent, and a log from gpgme:
>>> Have you configured gcc flags correctly for target platform? It seems that
>>> compiler (and libgcrypt assembly) are configured to allow unaligned memory
>>> accesses, but target does not support them.
> <...snip...>
>>> -Jussi
>>> [1]
>> I forget if I mentioned this before: the build flags are set by the default
>> Android build system.
>> So I built the whole thing again, manually adding -mno-unaligned-access to the
>> libgcrypt build, and the tests seem to be failing in the same place.  I tested
>> head of master on the armv7a emulator, which failed a lot more, and the head
>> of LIBGCRYPT-1-6-BRANCH on the Nexus 7 ARMv7 tablet, which failed in the same
>> places. Any pointers for next steps?
> That's a bit strange. Do you have crash logs of these?
> -Jussi

The crash log is here:

If you want to try running it on an Android device
or emulator, you can find a recent build here, but one what does not have
-mno-unaligned-access manually set:


>> FYI, I'm gathering all these log files on our bug tracker:
>> Attached are the latest test logs, including the full build log for head of
>> master running tests on the armv7a emulator.
>> .hc

PGP fingerprint: 5E61 C878 0F86 295C E17D  8677 9F0F E587 374B BE81

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 969 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20140120/21d70b86/attachment.sig>

More information about the Gnupg-devel mailing list