On Fri, 22 Jul 2016, Hisashi T Fujinaka wrote:> regress/unittests/test_helper/test_helper.c:162 > (gdb) p key > $1 = (struct sshkey *) 0x7037f9b120c0 > (gdb) p key->cert > $2 = (struct sshkey_cert *) 0x7037f9b1b080 > (gdb) p *key->cert > $3 = {certblob = 0x7037f9b162a0, type = 2, serial = 5, key_id = 0x7037f9b18090 > "julius", nprincipals = 1, > principals = 0xfffffffff9b180a0, valid_after = 915145200, valid_beforeThanks for taking the time to debug this. The key->cert->principals pointer looks wrong - does NetBSD libc provide a reallocarray function? We detect its presence during configure: checking for reallocarray... no (that's on Linux) Could you try commenting out the HAVE_REALLOCARRAY line in config.h make clean, make and rerun the test? -d
On Sat, 23 Jul 2016, Damien Miller wrote:> On Fri, 22 Jul 2016, Hisashi T Fujinaka wrote: > >> regress/unittests/test_helper/test_helper.c:162 >> (gdb) p key >> $1 = (struct sshkey *) 0x7037f9b120c0 >> (gdb) p key->cert >> $2 = (struct sshkey_cert *) 0x7037f9b1b080 >> (gdb) p *key->cert >> $3 = {certblob = 0x7037f9b162a0, type = 2, serial = 5, key_id = 0x7037f9b18090 >> "julius", nprincipals = 1, >> principals = 0xfffffffff9b180a0, valid_after = 915145200, valid_before > > Thanks for taking the time to debug this. > > The key->cert->principals pointer looks wrong - does NetBSD libc > provide a reallocarray function? We detect its presence during > configure: > > checking for reallocarray... no > > (that's on Linux) > > Could you try commenting out the HAVE_REALLOCARRAY line in config.h > make clean, make and rerun the test?That works. Weird how I need that on -current but not on -7. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE + BSChem + BAEnglish + MSCS + $2.50 = coffee
On Sat, Jul 23, 2016 at 2:30 PM, Hisashi T Fujinaka <htodd at twofifty.com> wrote: [...]>> Could you try commenting out the HAVE_REALLOCARRAY line in config.h >> make clean, make and rerun the test? > > That works. Weird how I need that on -current but not on -7.Looks like reallocarray was added after 7: it's in http://netbsd.gw.com/cgi-bin/man-cgi?reallocarray++NetBSD-current but it's not in http://netbsd.gw.com/cgi-bin/man-cgi?reallocarray++NetBSD-7.0.1. Maybe there's a bug in it? I note that the man page says the prototype needs "_OPENBSD_SOURCE", maybe the lack of prototype gets the return truncated to int? maybe try ./configure --with-cflags=-D_OPENBSD_SOURCE ? -- Darren Tucker (dtucker at zip.com.au) GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new) Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.