mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-14 21:47:19 +02:00
Do not use pth functions after pth_kill. Fixes bug#1320.
Fabian Keil found the reason for a SIGBUS: In the "gpg-agent --daemon" case, main() calls pth_kill() after the client has been forked, so when es_deinit() is called on exit, acquiring the estream_list_lock seems to cause pth to dereference a pointer located in a memory region that has previously been free()'d. My approach to fix it is different than his suggestion. It should allow to continue all estream operations after a pth_kill except for restarting pth.
This commit is contained in:
parent
1226772ffd
commit
ce98524554
5 changed files with 341 additions and 276 deletions
|
@ -231,6 +231,8 @@ typedef struct es_cookie_io_functions
|
|||
|
||||
int es_init (void);
|
||||
|
||||
int es_pth_kill (void);
|
||||
|
||||
estream_t es_fopen (const char *ES__RESTRICT path,
|
||||
const char *ES__RESTRICT mode);
|
||||
estream_t es_mopen (unsigned char *ES__RESTRICT data,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue