More gpgsm+gpgme problems

Werner Koch wk at gnupg.org
Sun May 9 16:42:09 CEST 2004


On Sun, 9 May 2004 13:30:12 +0200, Albrecht Dreß said:

> Arrgh - I enabled the coredumps as you said, recompiled with "-g -O - 
> fsigned-char" (the latter option is needed for PowerPC gcc) , and now it  

Why do you need to add this option? gcc should know about it.

> doesn't crash any more! IMHO, this might be an indication for a stack  
> corruption or buffer overflow somewhere in the code... Not a very

Last time I valgrinded I have seen no problems, though.

> I added some more warning options to CFLAGS (then using "-g -O -fsigned- 
> char -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wunused - 
> Wuninitialized -pedantic -Wmissing-declarations -Wmissing-prototypes"),  
> and got besides tons of non-critical stuff (?, pointers w/ different  

signed/unsigned mismatches are normal.

> iso7816.c:106: warning: overflow in implicit constant conversion

I'll change these constantd to unsigned.  But it is definitely not your
problem, this stuff is only used wth smartcards.

> Any ideas?

Try to reproduce the problem ;-).  If it does not occure anymore when
core dumps are enables, you should write a wrapper for gpgsm:

#!/bin/sh
exec strace -o /tmp/mylog /path/to/real/gpgsm $*

and see what the strace has to say.  There is also the option to add

debug-wait 10 

to gpgsm.conf and attach gdb to the running process (gpgsm will wait
right after option procssing for 10 seconds).


  Werner




More information about the Gnupg-devel mailing list