Those changes shouldn't affect ARM at all, since everything is under #if defined(__i386__) || defined(__x86_64__). What version of glibc are you building with on x86? On Fri, May 31, 2013 at 7:16 PM, Greg Fitzgerald <garious at gmail.com> wrote:> The failures happen on x86 Linux, Ubuntu Lucid. On ARM Android, my > example code segfaults, whereas before it worked. I wasn't planning to > debug that though since there are unit test failures on x86 Linux. > > Greg > > On May 31, 2013, at 2:37 AM, Sergey Matveev <earthdok at google.com> wrote: > > I'm confused - do those test failures happen on x86 Android? > > > On Fri, May 31, 2013 at 10:48 AM, Sergey Matveev <earthdok at google.com>wrote: > >> r182853 introduced an assumption about the size of thread descriptor in >> glibc. On your system it's 48 bytes off, which is why the tests fail. What >> version of libc are you using? >> >> (Repeating - my previous message got stuck in the moderation queue >> because the quoted text was too long.) >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130531/3f02503b/attachment.html>
> What version of glibc are you building with on x86?2.11.1 for 64-bit x86 linux $ ldd --version ldd (Ubuntu EGLIBC 2.11.1-0ubuntu7.8) 2.11.1 On Fri, May 31, 2013 at 8:24 AM, Sergey Matveev <earthdok at google.com> wrote:> Those changes shouldn't affect ARM at all, since everything is under #if > defined(__i386__) || defined(__x86_64__). > > What version of glibc are you building with on x86? > > > On Fri, May 31, 2013 at 7:16 PM, Greg Fitzgerald <garious at gmail.com> wrote: >> >> The failures happen on x86 Linux, Ubuntu Lucid. On ARM Android, my >> example code segfaults, whereas before it worked. I wasn't planning to >> debug that though since there are unit test failures on x86 Linux. >> >> Greg >> >> On May 31, 2013, at 2:37 AM, Sergey Matveev <earthdok at google.com> wrote: >> >> I'm confused - do those test failures happen on x86 Android? >> >> >> On Fri, May 31, 2013 at 10:48 AM, Sergey Matveev <earthdok at google.com> >> wrote: >>> >>> r182853 introduced an assumption about the size of thread descriptor in >>> glibc. On your system it's 48 bytes off, which is why the tests fail. What >>> version of libc are you using? >>> >>> (Repeating - my previous message got stuck in the moderation queue >>> because the quoted text was too long.) >> >> >
I switched to the release_33 branch for now. X86 build and unit tests are all working. For ARM Android, I required just this one-line change to compile. With that change I could build and run a simple example on Android Jellybean. Can you push this change to release_33? It is not needed on the master branch, because another change fixes the problem there. I attempted to cherry-pick just that fix, but it caused merge conflicts. I'm building against the elf.h in the NDK's API 14. If you guys are using a different API version and that version has an elf.h that includes stdint.h itself, please let me know and I can just jump to that instead. diff --git a/lib/sanitizer_common/sanitizer_symbolizer_linux.cc b/lib/sanitizer_common/sanitizer_symbolizer_linux.cc index 14a682b..4c3d2d4 100644 --- a/lib/sanitizer_common/sanitizer_symbolizer_linux.cc +++ b/lib/sanitizer_common/sanitizer_symbolizer_linux.cc @@ -20,6 +20,7 @@ #include "sanitizer_placement_new.h" #include "sanitizer_symbolizer.h" +#include <stdint.h> #include <elf.h> #include <errno.h> #include <poll.h> On Fri, May 31, 2013 at 9:48 AM, Greg Fitzgerald <garious at gmail.com> wrote:>> What version of glibc are you building with on x86? > > 2.11.1 for 64-bit x86 linux > > $ ldd --version > ldd (Ubuntu EGLIBC 2.11.1-0ubuntu7.8) 2.11.1 > > On Fri, May 31, 2013 at 8:24 AM, Sergey Matveev <earthdok at google.com> wrote: >> Those changes shouldn't affect ARM at all, since everything is under #if >> defined(__i386__) || defined(__x86_64__). >> >> What version of glibc are you building with on x86? >> >> >> On Fri, May 31, 2013 at 7:16 PM, Greg Fitzgerald <garious at gmail.com> wrote: >>> >>> The failures happen on x86 Linux, Ubuntu Lucid. On ARM Android, my >>> example code segfaults, whereas before it worked. I wasn't planning to >>> debug that though since there are unit test failures on x86 Linux. >>> >>> Greg >>> >>> On May 31, 2013, at 2:37 AM, Sergey Matveev <earthdok at google.com> wrote: >>> >>> I'm confused - do those test failures happen on x86 Android? >>> >>> >>> On Fri, May 31, 2013 at 10:48 AM, Sergey Matveev <earthdok at google.com> >>> wrote: >>>> >>>> r182853 introduced an assumption about the size of thread descriptor in >>>> glibc. On your system it's 48 bytes off, which is why the tests fail. What >>>> version of libc are you using? >>>> >>>> (Repeating - my previous message got stuck in the moderation queue >>>> because the quoted text was too long.) >>> >>> >>
As a temporary fix, you can replace this line in sanitizer_linux_libcdep.c: const uptr kThreadDescriptorSize = FIRST_32_SECOND_64(1216, 2304); with const uptr kThreadDescriptorSize = FIRST_32_SECOND_64(1168, 2304); The tests should pass after that. I need to figure out which ifdefs to put this under, so I might not be able to land the fix until Monday. On Fri, May 31, 2013 at 8:48 PM, Greg Fitzgerald <garious at gmail.com> wrote:> > What version of glibc are you building with on x86? > > 2.11.1 for 64-bit x86 linux > > $ ldd --version > ldd (Ubuntu EGLIBC 2.11.1-0ubuntu7.8) 2.11.1 > > On Fri, May 31, 2013 at 8:24 AM, Sergey Matveev <earthdok at google.com> > wrote: > > Those changes shouldn't affect ARM at all, since everything is under #if > > defined(__i386__) || defined(__x86_64__). > > > > What version of glibc are you building with on x86? > > > > > > On Fri, May 31, 2013 at 7:16 PM, Greg Fitzgerald <garious at gmail.com> > wrote: > >> > >> The failures happen on x86 Linux, Ubuntu Lucid. On ARM Android, my > >> example code segfaults, whereas before it worked. I wasn't planning to > >> debug that though since there are unit test failures on x86 Linux. > >> > >> Greg > >> > >> On May 31, 2013, at 2:37 AM, Sergey Matveev <earthdok at google.com> > wrote: > >> > >> I'm confused - do those test failures happen on x86 Android? > >> > >> > >> On Fri, May 31, 2013 at 10:48 AM, Sergey Matveev <earthdok at google.com> > >> wrote: > >>> > >>> r182853 introduced an assumption about the size of thread descriptor in > >>> glibc. On your system it's 48 bytes off, which is why the tests fail. > What > >>> version of libc are you using? > >>> > >>> (Repeating - my previous message got stuck in the moderation queue > >>> because the quoted text was too long.) > >> > >> > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130531/9e033673/attachment.html>