segfault in gcrypt 1.4.0

gnupg at ethen.de gnupg at ethen.de
Thu Feb 14 19:39:09 CET 2008


Hi,

I tried to compile gnupg-2.0.8 with libassuan-1.0.4, libgcrypt-1.4.0, libgpg-error-1.5 and libksba-1.0.3.
It gives me gpg2 in subdir g10 but stops with

make[3]: Entering directory `/extend/gpg/gnupg-2.0.8/tests/openpgp'                                                                                                   
echo '#!/bin/sh' >./gpg_dearmor                                                                                                                                        
echo "../../g10/gpg2 --no-options --no-greeting \                                                                                                                      
             --no-secmem-warning --batch --dearmor" >>./gpg_dearmor                                                                                                    
chmod 755 ./gpg_dearmor                                                                                                                                                
./gpg_dearmor > ./pubring.gpg < ./pubring.asc                                                                                                                          
./gpg_dearmor: line 2:  4801 Speicherzugriffsfehler  ../../g10/gpg2 --no-options --no-greeting --no-secmem-warning --batch --dearmor                                   
make[3]: *** [pubring.gpg] Fehler 139                                                                                                                                  
make[3]: Leaving directory `/extend/gpg/gnupg-2.0.8/tests/openpgp'                                                                                                    
make[2]: *** [all-recursive] Fehler 1                                                                                                                                  
make[2]: Leaving directory `/extend/gpg/gnupg-2.0.8/tests'                                                                                                            
make[1]: *** [all-recursive] Fehler 1                                                                                                                                  
make[1]: Leaving directory `/extend/gpg/gnupg-2.0.8'                                                                                                                  
make: *** [all] Fehler 2                                                                                                                                               

To get a closer look I compiled in a seperate directory /extend/gpg.
As I wrote yesterday, I need -fomit-frame-pointer to compile libgcrypt-1.4.0:
gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/extend/gpg/inst/include -g -O1 -Wall -Wpointer-arith -MT rijndael.lo -MD -MP -MF .deps/rijndael.Tpo -c rijndael.c -o rijndael.o
rijndael.c: In function `do_padlock':
rijndael.c:2062: error: can't find a register in class `GENERAL_REGS' while reloading `asm'

gcc --version
gcc (GCC) 3.3.3 (SuSE Linux)

I figured out that it is libgcrypt what segfaults...

(gdb) run
Starting program: /extend/gpg/gnupg-2.0.8/g10/gpg2 

Program received signal SIGSEGV, Segmentation fault.
0x40095f60 in ?? () from /extend/gpg/inst/lib/libgcrypt.so.11
(gdb) bt
#0  0x40095f60 in ?? () from /extend/gpg/inst/lib/libgcrypt.so.11
#1  0x4009d97d in detect_ia32_gnuc () from /extend/gpg/inst/lib/libgcrypt.so.11
#2  0x756ceaf9 in ?? ()
#3  0x00000000 in ?? ()
#4  0x756e6547 in ?? ()
#5  0x49656e69 in ?? ()
#6  0x6c65746e in ?? ()
#7  0x401188a4 in __JCR_LIST__ () from /extend/gpg/inst/lib/libgcrypt.so.11
#8  0x4009f100 in _gcry_ath_mutex_destroy () from /extend/gpg/inst/lib/libgcrypt.so.11
#9  0x00000000 in ?? ()
#10 0x401188a4 in __JCR_LIST__ () from /extend/gpg/inst/lib/libgcrypt.so.11
#11 0x00000001 in ?? ()
#12 0x00000020 in ?? ()
#13 0x00000000 in ?? ()
#14 0x401188a4 in __JCR_LIST__ () from /extend/gpg/inst/lib/libgcrypt.so.11
#15 0x4009da0d in _gcry_detect_hw_features () from /extend/gpg/inst/lib/libgcrypt.so.11
#16 0x00000000 in ?? ()
#17 0x401188a4 in __JCR_LIST__ () from /extend/gpg/inst/lib/libgcrypt.so.11
#18 0x40098884 in global_init () from /extend/gpg/inst/lib/libgcrypt.so.11
#19 0x00000000 in ?? ()
#20 0x401188a4 in __JCR_LIST__ () from /extend/gpg/inst/lib/libgcrypt.so.11
#21 0x40098ee2 in _gcry_vcontrol () from /extend/gpg/inst/lib/libgcrypt.so.11
#22 0x080d93ec in ?? ()
#23 0x00000017 in ?? ()
#24 0x08049ece in ?? ()
#25 0x40092f4c in ?? () from /extend/gpg/inst/lib/libgcrypt.so.11
#26 0x00000000 in ?? ()
#27 0x401188a4 in __JCR_LIST__ () from /extend/gpg/inst/lib/libgcrypt.so.11
#28 0x4009652f in gcry_control () from /extend/gpg/inst/lib/libgcrypt.so.11
#29 0xbffff094 in ?? ()
#30 0x00000000 in ?? ()
#31 0x40096511 in gcry_control () from /extend/gpg/inst/lib/libgcrypt.so.11
#32 0x00000000 in ?? ()
#33 0x4022abd0 in __elf_set___libc_thread_subfreeres_element___rpc_thread_destroy__ () from /lib/tls/libc.so.6
#34 0x00000024 in ?? ()
#35 0xffffe000 in ?? ()
#36 0x00001000 in ?? ()
#37 0xbffff2b4 in ?? ()
#38 0x400106e5 in _dl_sysdep_start () from /lib/ld-linux.so.2
#39 0x4012e500 in __libc_start_main () from /lib/tls/libc.so.6
#40 0x0804c251 in _start () at ../sysdeps/i386/elf/start.S:102

No problems if I use libgcrypt-1.2.2.
How can I fix it?



More information about the Gcrypt-devel mailing list