Bug#200619: gcc: parisc: compiling dietlibc-dev with -Os caus
Quoted 4 lines
[CC to jda]
Please can you recheck with a current gcc snapshot (from the gcc-snapshot package) and attach the preprocessed source?
This doesn't appear to be a gcc problem. The register %r3 is saved on the stack in __stdio_init_file_nothreads. The stack location is clobbered by the fstat syscall.
Quoted 3 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+ { + struct stat st; + fstat(fd,&st);
At the fstat call we have the following values:
Breakpoint 11, 0x00010b10 in __stdio_init_file_nothreads () (gdb) printf "0x%x\n",*0xfaf005a80xfaf004c0
(gdb) printf "0x%x\n",$r250xfaf00548
(gdb) printf "0x%x\n",$r260x5
(gdb) c
Continuing.
Breakpoint 12, 0x00010b18 in __stdio_init_file_nothreads () (gdb) printf "0x%x\n",*0xfaf005a80x0
0xfaf005a8 is the location where %r3 was saved. The break is at the fstat syscall. Non of the user space code in the call patch affects the above location, so the bug must be in the kernel.
I looked at this on a 64-bit kernel:
dave@gsyprf11:~/dietlibc-0.22.orig$ uname -a Linux gsyprf11.external.hp.com 2.4.21-pa6 #23 Mon Jul 14 23:11:39 PDT 2003 parisc64 GNU/Linux
Dave
Signature · 2 lines
J. David Anglin [email protected] National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
Quoted 4 lines
[CC to jda]
Please can you recheck with a current gcc snapshot (from the gcc-snapshot package) and attach the preprocessed source?
This doesn't appear to be a gcc problem. The register %r3 is saved on the stack in __stdio_init_file_nothreads. The stack location is clobbered by the fstat syscall.
Quoted 3 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+ { + struct stat st; + fstat(fd,&st);
At the fstat call we have the following values:
Breakpoint 11, 0x00010b10 in __stdio_init_file_nothreads () (gdb) printf "0x%x\n",*0xfaf005a80xfaf004c0
(gdb) printf "0x%x\n",$r250xfaf00548
(gdb) printf "0x%x\n",$r260x5
(gdb) c
Continuing.
Breakpoint 12, 0x00010b18 in __stdio_init_file_nothreads () (gdb) printf "0x%x\n",*0xfaf005a80x0
0xfaf005a8 is the location where %r3 was saved. The break is at the fstat syscall. Non of the user space code in the call patch affects the above location, so the bug must be in the kernel.
I looked at this on a 64-bit kernel:
dave@gsyprf11:~/dietlibc-0.22.orig$ uname -a Linux gsyprf11.external.hp.com 2.4.21-pa6 #23 Mon Jul 14 23:11:39 PDT 2003 parisc64 GNU/Linux
Dave
Signature · 2 lines
J. David Anglin [email protected] National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
Quoted 11 lines
This doesn't appear to be a gcc problem. The register %r3 is saved on the stack in
__stdio_init_file_nothreads. The stack location is clobbered by the fstat syscall.Quoted 3 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+ { + struct stat st; + fstat(fd,&st);At the fstat call we have the following values:
Breakpoint 11,
0x00010b10in__stdio_init_file_nothreads()
Carlos O'Donell and myself looked at this problem this afternoon. This is a dietlib problem. Dietlib is not using the correct kernel_stat mapping for parisc. They appear to be using the i386 mapping. They need to look at /libc/sysdeps/unix/sysv/linux/xstatconv.c and the hppa/kernel_stat.h header in glibc.
Dave
Signature · 2 lines
J. David Anglin [email protected] National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
Quoted 11 lines
This doesn't appear to be a gcc problem. The register %r3 is saved on the stack in
__stdio_init_file_nothreads. The stack location is clobbered by the fstat syscall.Quoted 3 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+ { + struct stat st; + fstat(fd,&st);At the fstat call we have the following values:
Breakpoint 11,
0x00010b10in__stdio_init_file_nothreads()
Carlos O'Donell and myself looked at this problem this afternoon. This is a dietlib problem. Dietlib is not using the correct kernel_stat mapping for parisc. They appear to be using the i386 mapping. They need to look at /libc/sysdeps/unix/sysv/linux/xstatconv.c and the hppa/kernel_stat.h header in glibc.
Dave
Signature · 2 lines
J. David Anglin [email protected] National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
reassign 200619 dietlibc
retitle 200619 dietlibc: parisc: bad stat struct mapping thanks
Quoted 9 lines · John David Anglin
Quoted 3 lines
At the fstat call we have the following values:
Breakpoint 11,
0x00010b10in__stdio_init_file_nothreads()Carlos O'Donell and myself looked at this problem this afternoon. This is a dietlib problem. Dietlib is not using the correct
kernel_statmapping for parisc. They appear to be using the i386 mapping. They need to look at /libc/sysdeps/unix/sysv/linux/xstatconv.c and thehppa/kernel_stat.hheader in glibc.
Yes, this seems to be the cause of the problems, and needs to be fixed in the dietlibc. Thanks a lot for your time looking into this, and your valuable support.
Regards, Gerrit.
reassign 200619 dietlibc
retitle 200619 dietlibc: parisc: bad stat struct mapping thanks
Quoted 9 lines · John David Anglin
Quoted 3 lines
At the fstat call we have the following values:
Breakpoint 11,
0x00010b10in__stdio_init_file_nothreads()Carlos O'Donell and myself looked at this problem this afternoon. This is a dietlib problem. Dietlib is not using the correct
kernel_statmapping for parisc. They appear to be using the i386 mapping. They need to look at /libc/sysdeps/unix/sysv/linux/xstatconv.c and thehppa/kernel_stat.hheader in glibc.
Yes, this seems to be the cause of the problems, and needs to be fixed in the dietlibc. Thanks a lot for your time looking into this, and your valuable support.
Regards, Gerrit.