This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated via c8d441345fb301e6f5aa828f217d377dbc4f252b (commit) via a3bc533a1afb73ca9cae97440008fa7d1c8765b6 (commit) via 36656f6dc23f5d0091f7a838b1885793a75e3b2f (commit) via f78f0bdec821793fd82734ee6e6c23cd6837e5d9 (commit) via 75d8660d99f1b5b5da471569955ffce9a27e8702 (commit) from e63d716d4b39402294a5f5fbb34e17e094f17748 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit c8d441345fb301e6f5aa828f217d377dbc4f252b Author: Max Filippov jcmvbkbc@gmail.com Date: Mon Feb 22 07:08:10 2016 +0300
xtensa: fix stack unwinding over __default_sa_restorer
For some xtensa cores generated code gets arranged so that __default_sa_restorer immediately follows preceding function. E.g.:
40a1b: c03340 sub a3, a3, a4 40a1e: f01d retw.n
00040a20 <__default_sa_restorer>: 40a20: e1a022 movi a2, 225 40a23: 005000 syscall
... Contents of the .eh_frame section: ... 000007f4 00000014 000007f8 FDE cie=00000000 pc=0004076c..00040a20 DW_CFA_advance_loc4: 3 to 0004076f DW_CFA_def_cfa_offset: 48
Due to the way xtensa libgcc uw_frame_state_for calls _Unwind_Find_FDE for non-signal frames, FDE for the previous function is found during thread cancellation signal stack unwinding in that case. Signal stack frame is not recognized and is not unwound properly, breaking cleanup routines calling for cancelled thread.
Insert padding before the __default_sa_restorer so that no FDE is found for it, MD_FALLBACK_FRAME_STATE_FOR is called by uw_frame_state_for and the frame is correctly recognized as signal frame.
Signed-off-by: Max Filippov jcmvbkbc@gmail.com
commit a3bc533a1afb73ca9cae97440008fa7d1c8765b6 Author: Anton Kolesov Anton.Kolesov@synopsys.com Date: Fri Feb 19 18:10:34 2016 +0300
ARC: Disable obstack
Obstack was enabled in ARC defconfig to enable builds of native binutils and GDB. This is not needed after earlier patch which removes invalid _GNU_OBSTACK_INTERFACE_VERSION definition in cases when obstack is not selected in uClibc configuration. With this change binutils and GDB would use obstack implementation from their own source trees. In fact with recent binutils it is not possible to build it using obstack implementation in uClibc, because binutils/include/obstack.h started to use _obstack_free function instead of obstack_free, but _obstack_free is not defined in uClibc.
Signed-off-by: Anton Kolesov Anton.Kolesov@synopsys.com Cc: Vineet Gupta Vineet.Gupta1@synopsys.com Cc: Alexey Brodkin abrodkin@synopsys.com
commit 36656f6dc23f5d0091f7a838b1885793a75e3b2f Author: Anton Kolesov Anton.Kolesov@synopsys.com Date: Fri Feb 19 18:10:33 2016 +0300
Advertise obstack only when chosen
This is similar to this patch for GNU glob: ff6ce3999db93a52d1cd22510f8508b660ddf54e.
The problem is that libiberty/obstack.c file checks for _GNU_OBSTACK_INTERFACE_VERSION == _OBSTACK_INTERFACE_VERSION and elides libiberty obstack implementation if there is already a compatible implementation in libc. Therefore define should be set only when obstack is actually selected, otherwise it is not possible to build binutils and gdb with uClibc.
Signed-off-by: Anton Kolesov Anton.Kolesov@synopsys.com Cc: Vineet Gupta Vineet.Gupta1@synopsys.com Cc: Alexey Brodkin abrodkin@synopsys.com
commit f78f0bdec821793fd82734ee6e6c23cd6837e5d9 Author: Ubaldo Porcheddu ubaldo@eja.it Date: Sat Feb 20 22:18:38 2016 +0000
Replace /etc/resolv.conf with _PATH_RESCONF to allow portability of the code on system where resolv.conf is not in /etc .
Signed-off-by: Ubaldo Porcheddu ubaldo@eja.it
commit 75d8660d99f1b5b5da471569955ffce9a27e8702 Author: Ubaldo Porcheddu ubaldo@eja.it Date: Sat Feb 20 22:18:37 2016 +0000
Replaced any occurence of /bin/sh with _PATH_BSHELL to allow easier portability on system with default shell on a different directory, like for instance on android.
Signed-off-by: Ubaldo Porcheddu ubaldo@eja.it
-----------------------------------------------------------------------
Summary of changes: extra/Configs/defconfigs/arc/arcv2_defconfig | 1 - extra/Configs/defconfigs/arc/defconfig | 1 - include/gnu-versions.h | 2 ++ libc/inet/resolv.c | 4 ++-- libc/stdio/popen.c | 3 ++- libc/stdlib/system.c | 7 ++++--- libc/sysdeps/linux/xtensa/sigrestorer.S | 6 ++++++ libc/unistd/exec.c | 5 +++-- 8 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/extra/Configs/defconfigs/arc/arcv2_defconfig b/extra/Configs/defconfigs/arc/arcv2_defconfig index 9e34694..2d12358 100644 --- a/extra/Configs/defconfigs/arc/arcv2_defconfig +++ b/extra/Configs/defconfigs/arc/arcv2_defconfig @@ -9,7 +9,6 @@ LDSO_RUNPATH=y # LDSO_SAFE_RUNPATH is not set UCLIBC_HAS_THREADS_NATIVE=y PTHREADS_DEBUG_SUPPORT=y -UCLIBC_HAS_OBSTACK=y UCLIBC_HAS_UTMPX=y UCLIBC_HAS_UTMP=y UCLIBC_SUSV2_LEGACY=y diff --git a/extra/Configs/defconfigs/arc/defconfig b/extra/Configs/defconfigs/arc/defconfig index bd93696..f582eb5 100644 --- a/extra/Configs/defconfigs/arc/defconfig +++ b/extra/Configs/defconfigs/arc/defconfig @@ -8,7 +8,6 @@ LDSO_RUNPATH=y # LDSO_SAFE_RUNPATH is not set UCLIBC_HAS_THREADS_NATIVE=y PTHREADS_DEBUG_SUPPORT=y -UCLIBC_HAS_OBSTACK=y UCLIBC_HAS_UTMPX=y UCLIBC_HAS_UTMP=y UCLIBC_SUSV2_LEGACY=y diff --git a/include/gnu-versions.h b/include/gnu-versions.h index 9f53778..6678c9b 100644 --- a/include/gnu-versions.h +++ b/include/gnu-versions.h @@ -43,7 +43,9 @@ remember, if any of these versions change, the libc.so major version number must change too (so avoid it)! */
+#ifdef __UCLIBC_HAS_OBSTACK__ #define _GNU_OBSTACK_INTERFACE_VERSION 1 /* vs malloc/obstack.c */ +#endif #define _GNU_REGEX_INTERFACE_VERSION 1 /* vs posix/regex.c */ #ifdef __UCLIBC_HAS_GNU_GLOB__ #define _GNU_GLOB_INTERFACE_VERSION 1 /* vs posix/glob.c */ diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index 4028afc..4b33896 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -974,7 +974,7 @@ void __open_nameservers(void) if (!__res_sync) { /* Reread /etc/resolv.conf if it was modified. */ struct stat sb; - if (stat("/etc/resolv.conf", &sb) != 0) + if (stat(_PATH_RESCONF, &sb) != 0) sb.st_mtime = 0; if (resolv_conf_mtime != (uint32_t)sb.st_mtime) { resolv_conf_mtime = sb.st_mtime; @@ -988,7 +988,7 @@ void __open_nameservers(void) __resolv_timeout = RES_TIMEOUT; __resolv_attempts = RES_DFLRETRY;
- fp = fopen("/etc/resolv.conf", "r"); + fp = fopen(_PATH_RESCONF, "r"); #ifdef FALLBACK_TO_CONFIG_RESOLVCONF if (!fp) { /* If we do not have a pre-populated /etc/resolv.conf then diff --git a/libc/stdio/popen.c b/libc/stdio/popen.c index e1b1d40..1efbd3b 100644 --- a/libc/stdio/popen.c +++ b/libc/stdio/popen.c @@ -17,6 +17,7 @@
#include <stdio.h> #include <stdlib.h> +#include <paths.h> #include <errno.h> #include <unistd.h> #include <sys/wait.h> @@ -91,7 +92,7 @@ FILE *popen(const char *command, const char *modes) close(po->f->__filedes); }
- execl("/bin/sh", "sh", "-c", command, (char *)0); + execl(_PATH_BSHELL, "sh", "-c", command, (char *)0);
/* SUSv3 mandates an exit code of 127 for the child if the * command interpreter can not be invoked. */ diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c index 8a6734d..771c30e 100644 --- a/libc/stdlib/system.c +++ b/libc/stdlib/system.c @@ -11,6 +11,7 @@ #include <unistd.h> #include <sys/wait.h> #include <stdlib.h> +#include <paths.h> #ifdef __UCLIBC_HAS_THREADS_NATIVE__ #include <sched.h> #include <errno.h> @@ -50,7 +51,7 @@ int __libc_system(const char *command) sigaction(SIGINT, &save_int, NULL); sigprocmask(SIG_SETMASK, &save_mask, NULL);
- execl("/bin/sh", "sh", "-c", command, (char *) 0); + execl(_PATH_BSHELL, "sh", "-c", command, (char *) 0); _exit(127); }
@@ -169,7 +170,7 @@ do_system (const char *line) { /* Child side. */ const char *new_argv[4]; - new_argv[0] = "/bin/sh"; + new_argv[0] = _PATH_BSHELL; new_argv[1] = "-c"; new_argv[2] = line; new_argv[3] = NULL; @@ -181,7 +182,7 @@ do_system (const char *line) INIT_LOCK ();
/* Exec the shell. */ - (void) execve ("/bin/sh", (char *const *) new_argv, __environ); + (void) execve (_PATH_BSHELL, (char *const *) new_argv, __environ); _exit (127); } else if (pid < (pid_t) 0) diff --git a/libc/sysdeps/linux/xtensa/sigrestorer.S b/libc/sysdeps/linux/xtensa/sigrestorer.S index 474a893..697f54e 100644 --- a/libc/sysdeps/linux/xtensa/sigrestorer.S +++ b/libc/sysdeps/linux/xtensa/sigrestorer.S @@ -11,6 +11,12 @@ #endif
.text + /* This space separates __default_sa_restorer from the previous + * function, so that its corresponding FDE is not mistakenly found + * by the libgcc stack unwinder. This is important for correct signal + * stack unwinding. + */ + .space 1 .align 4 .global __default_sa_restorer .type __default_sa_restorer, @function diff --git a/libc/unistd/exec.c b/libc/unistd/exec.c index 8fa42e5..9be856d 100644 --- a/libc/unistd/exec.c +++ b/libc/unistd/exec.c @@ -20,6 +20,7 @@
#include <stdio.h> #include <stdlib.h> +#include <paths.h> #include <string.h> #include <errno.h> #include <stdarg.h> @@ -273,9 +274,9 @@ int execvpe(const char *path, char *const argv[], char *const envp[]) nargv[1] = (char *)path; memcpy(nargv+2, argv+1, n*sizeof(char *)); #if defined (L_execvp) - execve("/bin/sh", nargv, __environ); + execve(_PATH_BSHELL, nargv, __environ); #elif defined (L_execvpe) - execve("/bin/sh", nargv, envp); + execve(_PATH_BSHELL, nargv, envp); #endif EXEC_FREE(nargv, size2); }
hooks/post-receive