Bug 2301

Summary: test_sshbuf_misc.c:44 ASSERT_INT_NE(feof(out), 0) failed
Product: Portable OpenSSH Reporter: openssh
Component: Regression testsAssignee: Assigned to nobody <unassigned-bugs>
Status: NEW ---    
Severity: normal CC: djm
Priority: P5    
Version: 6.7p1   
Hardware: MIPS   
OS: IRIX   

Description openssh 2014-10-28 23:43:01 AEDT
When compiled with -g0, test_sshbuf dies with an assert on IRIX 6.5.30:

test_sshbuf: .....................................................................................
regress/unittests/sshbuf/test_sshbuf_misc.c:44 test #86 "sshbuf_dump"
ASSERT_INT_NE(feof(out), 0) failed:
   feof(out) = 0
           0 = 0
/bin/sh[2]: 73136 Abort


when compiled with Optimizations (I've only tried -O3), the test dies with a segfault:

test_sshbuf: .....................................................................................Process 83095 (test_sshbuf) stopped on signal SIGSEGV: Segmentation violation (default) at [memcpy:357 ,0xfa433ec]
         Source (of /xlv41/6.5.30m/work/irix/lib/libc/libc_n32_M4/strings/bcopy.s) not available for Process 83095
(dbx) where
>  0 memcpy(0x10021b68, 0x0, 0x1, 0xfa474e8, 0x110f9c, 0x0, 0x2, 0x7ffb7cd8) ["/xlv41/6.5.30m/work/irix/lib/libc/libc_n32_M4/strings/bcopy.s":357, 0xfa433ec]
   1 _doprnt(0x0, 0x8040, 0xfb4f7f8, 0x0, 0x0, 0x0, 0x0, 0x0) ["/xlv41/6.5.30m/work/irix/lib/libc/libc_n32_M4/print/doprnt.c":1734, 0xfa49b0c]
   2 fprintf(0xfb4f7f8, 0x10010a40, 0x0, 0x0, 0x110f9c, 0x0, 0x2, 0x7ffb7cd8) ["/xlv41/6.5.30m/work/irix/lib/libc/libc_n32_M4/print/fprintf.c":56, 0xfa59e80]
   3 sshbuf_dump_data(0x0, 0x4, 0xfb4f7f8, 0x0, 0x110f9c, 0x0, 0x2, 0x7ffb7cd8) ["/usr/people/canavan/src/openssh/openssh-6.7p1/sshbuf-misc.c":42, 0x10014cf4]
   4 sshbuf_dump(0x100214c0, 0xfb4f7f8, 0x1, 0xfa474e8, 0x110f9c, 0x0, 0x2, 0x7ffb7cd8) ["/usr/people/canavan/src/openssh/openssh-6.7p1/sshbuf-misc.c":66, 0x10014e78]
   5 sshbuf_misc_tests(0x10021b68, 0x0, 0x1, 0xfa474e8, 0x110f9c, 0x0, 0x2, 0x7ffb7cd8) ["/usr/people/canavan/src/openssh/openssh-6.7p1/regress/unittests/sshbuf/test_sshbuf_misc.c":39, 0x1000be00]
   6 tests(0x10021b68, 0x0, 0x1, 0xfa474e8, 0x110f9c, 0x0, 0x2, 0x7ffb7cd8) ["/usr/people/canavan/src/openssh/openssh-6.7p1/regress/unittests/sshbuf/tests.c":24, 0x10003e00]
   7 main(0x1, 0xfa58cf0, 0x1, 0xfa474e8, 0x110f9c, 0x0, 0x2, 0x7ffb7cd8) ["/usr/people/canavan/src/openssh/openssh-6.7p1/regress/unittests/test_helper/test_helper.c":158, 0x1000e844]
   8 __start() ["/xlv55/kudzu-apr12/work/irix/lib/libc/libc_n32_M4/csu/crt1text.s":177, 0x10003d68]
Comment 1 Damien Miller 2014-12-11 16:16:58 AEDT
This is probably due to Irix's libc not support the %z format characters.
Comment 2 Damien Miller 2020-01-25 23:57:40 AEDT
Does the autoconf-generated config.h define BROKEN_SNPRINTF on your platform?