segfault when calling time()

[email protected] Wed, 10 Jun 2015 15:43:52 +0200 (CEST)
Newsgroups gmane.linux.lib.dietlibc
Message-ID <96271358.17945.1433943832772.JavaMail.ngmail@webmail11.arcor-online.net>
Hi,

I'm getting a segfault when running this simple program:

#include <time.h>

int main(int argc, char *argv[])
{
	time_t t;

	t = time(NULL);

	// use t
	if(t>10)
		return 1;

	return 0;
};

I'm using the current cvs version on an amd64 (x86_64) PC.

The segfault remains also when using a DEBUG=1 version of the dietlibc,
here is what gdb says:

Current directory is /tmp/imx25_build/src/
GNU gdb (GDB) 7.9.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /tmp/imx25_build/src/test...done.
(gdb) r
Starting program: /tmp/imx25_build/src/test 

Program received signal SIGSEGV, Segmentation fault.
0xffffffffff600400 in ?? ()
(gdb) 

giorgio


Giorgio, [email protected]