uclibc 0.9.32rc1 for cris architecture

Waldemar Brodkorb wbx at openadk.org
Fri Jan 14 14:45:31 UTC 2011


Hi Developers,

I have a problem with 0.9.32-rc1 (with old linuxthreads) on my
Foxboard LX.
An older version of uClibc (0.9.30.3) works fine. After applying
following patches from
OpenWrt, I get 0.9.32-rc1 compiled:
https://dev.openwrt.org/browser/trunk/toolchain/uClibc/patches-0.9.32/150-cris_missing_syscall_include.patch
https://dev.openwrt.org/browser/trunk/toolchain/uClibc/patches-0.9.32/151-cris_add_sys_user_h.patch

Starting a system from NFS does crash when calling mdev from
busybox.
After using git bisect, I found the bad commit
711ad9f92c1cf992c4a3d9f4f709bd692be7789c.
Not only blackfin uses the new code, also cris pick it up. When I
revert the commit, everything
is fine again.

Does anybody see the reason, why the code in trunk fails on cris?

Thanks in advance 
 Waldemar
-------------- next part --------------
[42949379.142241] mdev (pid 132) segfaults for page address cb46c000 at pc 000ff0aa
[42949379.149775] IRP: 000ff0aa SRP: 355a76cc DCCR: 000005a2 USP: 9f9e9a04 MOF: 00000106
[42949379.157954]  r0: 355aa630  r1: 355aa72c   r2: 000fc019  r3: 000ff0a0
[42949379.164873]  r4: 00108698  r5: 00000000   r6: cb46dc70  r7: 00006000
[42949379.171797]  r8: 001071d8  r9: 000000be  r10: 00000085 r11: 9f9e99ec
[42949379.178514] r12: 9f9e99d8 r13: 00000008 oR10: 00000085  sp: c1ebdfa4
[42949379.185399] R_MMU_CAUSE: cb46d113
[42949379.189007] Process mdev (pid: 132, stackpage=c1f67940)
Segmentation fault

-------------- next part --------------
diff -Nur uClibc-0.9.32-rc1.orig/libc/sysdeps/linux/common/vfork.c uClibc-0.9.32-rc1/libc/sysdeps/linux/common/vfork.c
--- uClibc-0.9.32-rc1.orig/libc/sysdeps/linux/common/vfork.c	2010-12-17 20:05:17.000000000 +0100
+++ uClibc-0.9.32-rc1/libc/sysdeps/linux/common/vfork.c	2010-12-31 14:28:19.259431750 +0100
@@ -4,30 +4,24 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
+/* Trivial implementation for arches that lack vfork */
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/syscall.h>
 
-extern __typeof(vfork) __vfork attribute_hidden;
-
-#ifdef __NR_vfork
-
-# define __NR___vfork __NR_vfork
-_syscall0(pid_t, __vfork)
-
-weak_alias(__vfork,vfork)
-libc_hidden_weak(vfork)
-
-#elif defined __ARCH_USE_MMU__ && defined __NR_fork
+#ifdef __ARCH_USE_MMU__
 
-/* Trivial implementation for arches that lack vfork */
+#ifdef __NR_fork
+/* libc_hidden_proto(fork) */
 
+extern __typeof(vfork) __vfork attribute_hidden;
 pid_t __vfork(void)
 {
     return fork();
 }
-
+/* libc_hidden_proto(vfork) */
 weak_alias(__vfork,vfork)
 libc_hidden_weak(vfork)
+#endif
 
 #endif


More information about the uClibc mailing list