Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jul 2015 00:00:48 +0200
From:      Oliver Pinter <oliver.pinter@hardenedbsd.org>
To:        FreeBSD-Current <freebsd-current@freebsd.org>
Subject:   gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT
Message-ID:  <CAPQ4ffuTcN_ytcH7GPY0s6OqWK9qo6MGaVZhOB%2B0ojWfd=fNCg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi all!

We discovered that one of the kyua test failing from gettimeofday tests.
The error is reproducible on recent snapshot from 11-CURRENT:
ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/amd64/amd64/ISO-IMAGES/11.0/FreeBSD-11.0-CURRENT-amd64-20150630-r284969-disc1.iso

root@freebsd:~ # cat test-gtod.c
#include <sys/time.h>
#include <stdio.h>

int
main(int argc, char **argv)
{

        return (gettimeofday((void *)-1, NULL));
}
root@freebsd:~ # make test-gtod
cc -O2 -pipe    test-gtod.c  -o test-gtod
root@freebsd:~ # uname -a
FreeBSD freebsd 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r284969: Tue Jun
30 22:05:35 UTC 2015
root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
root@freebsd:~ # ./test-gtod
Segmentation fault (core dumped)

root@freebsd:~ # gdb ./test-gtod
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"...(no debugging
symbols found)...
(gdb) r
Starting program: /root/test-gtod
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x0000000800958fbd in bcopy () from /lib/libc.so.7
(gdb) bt
#0  0x0000000800958fbd in bcopy () from /lib/libc.so.7
#1  0x00000000559c1291 in ?? ()
#2  0xf9fde38df0174b80 in ?? ()
#3  0xffffffffffffffff in ?? ()
#4  0x0000000000000000 in ?? ()

And this is the original kyua test:
op@opn sys> kyua test gettimeofday_test
gettimeofday_test:gettimeofday_err  ->  broken: Premature exit; test
case received signal 11 (core dumped)  [0.987s]
gettimeofday_test:gettimeofday_mono  ->  passed  [0.014s]

Results file id is usr_tests_lib_libc_sys.20150707-215959-750045
Results saved to
/usr/home/op/.kyua/store/results.usr_tests_lib_libc_sys.20150707-215959-750045.db

1/2 passed (1 failed)
op@opn sys> pwd
/usr/tests/lib/libc/sys



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPQ4ffuTcN_ytcH7GPY0s6OqWK9qo6MGaVZhOB%2B0ojWfd=fNCg>