Page MenuHome GnuPG

gnupg 2.1, gpg-agent crashing on 'assertion failed' (OS X, Homebrew)
Closed, ResolvedPublic


I'm having the exact same issue as T2358, I get an assertion in gpg-agent
(libgpg-error really) when trying to decrypt a file. The assert is

assert (stream->flags.writing);

at estream.c:1873

I'm using gpg 2.1.12 and libgpg-error 1.22.

I attaching a file with two relevant stack traces here, the first trace is from the
assert (I've anonymized some strings) and the second one is from where stream-

flags.writing is being set to 0 prior to the assert. The line numbers might be a

few lines off since I have some printfs in there.




Event Timeline

I think that it is (long standing) bug in estream.c. Please see the attached
patch for a possible fix.
The enhancement in gnupg, the commit of 12af263 does READ then WRITE with
estream, and it reveals this bug.

I applied your patch (commit 28fd0ab) and will do a new release soon.

1.23 has meanwhile been released.