Bug#413078: Gcc does not work after kernel upgrade
Can reproduce diff probs with other kernels.
I had upgraded libc6 at same time as kernel.
Sorry, I should report in libc6 when I figure it out.
32-bit powerpc
andrewb@chrp:~/src$ gcc -Wall -Werror -o gettimeofday gettimeofday.c
andrewb@chrp:~/src$ ./gettimeofday
(nil) <- NULL not expected!
Segmentation fault <- Expected with NULL in vmlinux
64-bit amd64
andrewb@thot:~/public_html/c-run$ ./gettimeofday
0xf7e8cc8c <- Not NULL,
18589.085472 <- but WRONG
Computer won't even give me the time of day.
/* #include <stdlib.h> */
#include <stdio.h>
#include <sys/time.h>
#include <time.h>
int main()
{
struct timeval *tp;
/* struct timeval {
unsigned long tv_sec;
unsigned long tv_usec;
} *tp;
struct timeval {
time_t tv_sec;
suseconds_t tv_usec;
} *tp;
int j; */
printf("%p\n",tp); /* says (nil) ! */
/*
j=gettimeofday(tp, (struct timezone *)0);
*/
gettimeofday(tp, 0);
printf("%lu.%06lu\n", tp->tv_sec, tp->tv_usec);
/*
exit(0);
*/
return 0;
}
Reply to: