Skip to content

Commit

Permalink
2017-09-07 Matthias Klose <doko@ubuntu.com>
Browse files Browse the repository at this point in the history
        Backported from mainline
        2017-07-14  Jakub Jelinek  <jakub@redhat.com>

        PR sanitizer/81066
        * sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969.
        * sanitizer_common/sanitizer_linux.cc: Likewise.
        * sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise.
        * tsan/tsan_platform_linux.cc: Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@251828 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
doko committed Sep 7, 2017
1 parent b2d6130 commit 8937b94
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
11 changes: 11 additions & 0 deletions libsanitizer/ChangeLog
@@ -1,3 +1,14 @@
2017-09-07 Matthias Klose <doko@ubuntu.com>

Backported from mainline
2017-07-14 Jakub Jelinek <jakub@redhat.com>

PR sanitizer/81066
* sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969.
* sanitizer_common/sanitizer_linux.cc: Likewise.
* sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise.
* tsan/tsan_platform_linux.cc: Likewise.

2017-07-04 Release Manager

* GCC 6.4.0 released.
Expand Down
3 changes: 1 addition & 2 deletions libsanitizer/sanitizer_common/sanitizer_linux.cc
Expand Up @@ -546,8 +546,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
}
#endif

uptr internal_sigaltstack(const struct sigaltstack *ss,
struct sigaltstack *oss) {
uptr internal_sigaltstack(const void *ss, void *oss) {
return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
}

Expand Down
4 changes: 1 addition & 3 deletions libsanitizer/sanitizer_common/sanitizer_linux.h
Expand Up @@ -19,7 +19,6 @@
#include "sanitizer_platform_limits_posix.h"

struct link_map; // Opaque type returned by dlopen().
struct sigaltstack;

namespace __sanitizer {
// Dirent structure for getdents(). Note that this structure is different from
Expand All @@ -28,8 +27,7 @@ struct linux_dirent;

// Syscall wrappers.
uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
uptr internal_sigaltstack(const struct sigaltstack* ss,
struct sigaltstack* oss);
uptr internal_sigaltstack(const void* ss, void* oss);
uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
__sanitizer_sigset_t *oldset);
void internal_sigfillset(__sanitizer_sigset_t *set);
Expand Down
Expand Up @@ -267,7 +267,7 @@ static int TracerThread(void* argument) {

// Alternate stack for signal handling.
InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
struct sigaltstack handler_stack;
stack_t handler_stack;
internal_memset(&handler_stack, 0, sizeof(handler_stack));
handler_stack.ss_sp = handler_stack_memory.data();
handler_stack.ss_size = kHandlerStackSize;
Expand Down
2 changes: 1 addition & 1 deletion libsanitizer/tsan/tsan_platform_linux.cc
Expand Up @@ -291,7 +291,7 @@ bool IsGlobalVar(uptr addr) {
int ExtractResolvFDs(void *state, int *fds, int nfd) {
#if SANITIZER_LINUX
int cnt = 0;
__res_state *statp = (__res_state*)state;
struct __res_state *statp = (struct __res_state*)state;
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
fds[cnt++] = statp->_u._ext.nssocks[i];
Expand Down

0 comments on commit 8937b94

Please sign in to comment.