GnuPG 1.9.95: gpg2 segfaults on build test

Hirohisa Yamaguchi umq.461 at gmail.com
Tue Nov 7 03:01:15 CET 2006


Hi

In my FreeBSD/amd64 box, gpg2 build test fails with a SIGSEGV.

It seems like the same problem as the one reported in last month.
 # http://lists.gnupg.org/pipermail/gnupg-devel/2006-October/023253.html

I attached gdb backtrace below.
Any suggestions?.


-- 

	Hirohisa Yamaguchi
	  umq.461 at gmail.com

Configure Environment:
  CFLAGS="-g -O2 -fno-strict-aliasing -pipe -march=athlon64 -I/usr/local/include/pth"
  LDFLAGS=" -L/usr/local/lib/pth"
  SHELL=/bin/sh
  CONFIG_SHELL=/bin/sh
  PORTOBJFORMAT=elf
  MAKE=gmake
  lt_cv_sys_max_cmd_len=262144

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
(gdb) b parse-packet.c:1958
Breakpoint 1 at 0x424020: file parse-packet.c, line 1958.
(gdb) r -v -v --homedir . --quiet --yes --no-permission-warning --import ./pubdemo.asc
Starting program: /usr/ports/security/gnupg-devel/work/gnupg-1.9.95/g10/gpg2 -v -v --homedir . --quiet --yes --no-permission-warning --import ./pubdemo.asc

Breakpoint 1, parse_key (inp=0x8016701a0, pkttype=6, pktlen=412, hdr=0x7fffffffe0d0 "\004", hdrlen=3, pkt=0x801604180)
    at parse-packet.c:1958
1958		    n = pktlen; pk->pkey[i] = mpi_read(inp, &n, 0 ); pktlen -=n;
(gdb) p pk
$1 = (PKT_public_key *) 0x8016901a0
(gdb) p &pk->pkey[i]
$2 = (gcry_mpi_t *) 0x801690228
(gdb) n

Program received signal SIGSEGV, Segmentation fault.
0x000000000042403b in parse_key (inp=0x8016701a0, pkttype=0, pktlen=412, hdr=0x8012de040 "$=}\224", hdrlen=3, pkt=0x801604180)
    at parse-packet.c:1958
1958		    n = pktlen; pk->pkey[i] = mpi_read(inp, &n, 0 ); pktlen -=n;
(gdb) p pk
$3 = (PKT_public_key *) 0x800000000
(gdb) p &pk->pkey[i]
$4 = (gcry_mpi_t *) 0x800000088
(gdb) bt full
#0  0x000000000042403b in parse_key (inp=0x8016701a0, pkttype=0, pktlen=412, hdr=0x8012de040 "$=}\224", hdrlen=3, pkt=0x801604180)
    at parse-packet.c:1958
	pk = (PKT_public_key *) 0x800000000
	i = 0
	version = 0
	algorithm = 0
	n = 130
	timestamp = 4
	expiredate = 0
	max_expiredate = 0
	npkey = 4
	nskey = 5
	is_v4 = 1
	rc = 0
#1  0x0000000000425f74 in parse (inp=0x8016701a0, pkt=0x801604180, onlykeypkts=0, retpos=0x2, skip=0x7fffffffe2e4, out=0x0, do_skip=0, 
    dbg_w=0x47a4f8 "parse", dbg_f=0x801608160 "\020", dbg_l=23101792) at parse-packet.c:535
	rc = 2
	c = 19783744
	ctb = -7876
	pkttype = 6
	lenbytes = 2
	pktlen = 418
	hdr = "\231\001¢\000\b\000\000"
	hdrlen = 3
	new_ctb = 0
	partial = 0
	with_uid = 0
	__func__ = "parse"
#2  0x00000000004273e5 in dbg_parse_packet (inp=0x8016701a0, pkt=0x801604180, dbg_f=0x481e30 "import.c", dbg_l=375) at parse-packet.c:212
	skip = 0
	rc = 23101792
#3  0x00000000004478db in import (inp=0x8016701a0, fname=0x7fffffffedac "./pubdemo.asc", stats=0x801660180, fpr=0x0, fpr_len=0x0, 
    options=8) at import.c:437
	pending_pkt = (PACKET *) 0x0
	keyblock = 0x0
	rc = 23085440
#4  0x00000000004485f5 in import_keys_internal (inp=0x8016701a0, fnames=0x7fffffffeb68, nnames=1, stats_handle=0x0, fpr=0x0, fpr_len=0x0, 
    options=8) at import.c:198
	fname = 0x7fffffffedac "./pubdemo.asc"
	inp2 = 0x8016701a0
	i = 0
	rc = 0
	stats = (struct stats_s *) 0x801660180
#5  0x00000000004486fc in import_keys (fnames=0x8012de048, nnames=0, stats_handle=0x801608160, options=19783744) at import.c:231
No locals.
#6  0x00000000004095aa in main (argc=1, argv=0x7fffffffeb68) at gpg.c:3492
	badalg = 0x1 <Error reading address 0x1: Bad address>
	badtype = 23101792
	pargs = {argc = 0x7fffffffe59c, argv = 0x7fffffffe590, flags = 32769, err = 0, r_opt = 0, r_type = 0, r = {ret_int = 0, 
    ret_long = 0, ret_ulong = 0, ret_str = 0x0}, internal = {idx = 9, inarg = 0, stopped = 1, last = 0x7fffffffedac "./pubdemo.asc", 
    aliases = 0x0, cur_alias = 0x0}}
	a = 0x1
	rc = 23101792
	orig_argc = -4692
	orig_argv = (char **) 0x0
	fname = 0x7fffffffedac "./pubdemo.asc"
	username = 0x1 <Error reading address 0x1: Bad address>
	may_coredump = 0
	sl = 0x0
	remusr = 0x0
	locusr = 0x0
	nrings = 0x0
	sec_nrings = 0x0
	afx = {what = 4200888, only_keyblocks = 0, hdrlines = 0x402cb7 "atexit", no_openpgp_data = 0, inp_checked = 0, 
  inp_bypass = 5858381, in_cleartext = 8, not_dash_escaped = 0, hashes = 1, faked = -5544, truncated = 32767, qp_detected = 6017024, 
  pgp2mode = 8, eol = "\000`[", buffer = 0x599af0 "\340W\002\001\b", buffer_size = 1, buffer_len = 0, buffer_pos = 0, 
  radbuf = "\000\000\000", idx = 5870905, idx2 = 8, crc = 16930784, status = 8, cancel = 5858744, any_data = 8, pending_lf = 0}
	detached_sig = 0
	configfp = (FILE *) 0x1
	configname = 0x1 <Error reading address 0x1: Bad address>
	save_configname = 0x0
	configlineno = 0
	parse_debug = 0
	default_config = 0
	default_keyring = 1
	greeting = 0
	nogreeting = 0
	logfile = 0x0
	use_random_seed = 1
	cmd = aImport
	debug_level = 0x0
	trustdb_name = 0x0
	def_cipher_string = 0x0
	def_digest_string = 0x0
	compress_algo_string = 0x0
	cert_digest_string = 0x0
	s2k_cipher_string = 0x0
	s2k_digest_string = 0x0
	pers_cipher_list = 0x0
	pers_digest_list = 0x470e2a "h2"
	pers_compress_list = 0x0
	eyes_only = 0
	multifile = 0
	pwfd = -1
	with_fpr = 0
	any_explicit_recipient = 0
	require_secmem = 0
	got_secmem = 1
	__FUNCTION__ = "main"
(gdb) q
The program is running.  Exit anyway? (y or n) 



More information about the Gnupg-devel mailing list