On Tue, May 13, 2014 at 12:05 PM,  <pins...@gmail.com> wrote:
>
>
>> On May 13, 2014, at 12:59 AM, Konstantin Serebryany 
>> <konstantin.s.serebry...@gmail.com> wrote:
>>
>> I've committed this upstream and will include it into my next updated patch:
>>
>> +#if defined(__x86_64__) && !defined(_LP64)
>> +  typedef long long __sanitizer_time_t;
>> +#else
>> +  typedef long __sanitizer_time_t;
>> +#endif
>> +
>>   struct __sanitizer_timeb {
>> -    long time;
>> +    __sanitizer_time_t time;
>>     unsigned short millitm;
>
>
> This will also be needed for ilp32 aarch64 too.
>>
>>
>> If this is not enough, please contribute patches directly upstream --
>> I can not accept them from here.
>
>
> I am still against the way Libsanitizer is being maintained.

I do not enjoy it either. Suggestions are welcome, and see below!

> I really think the maintainers of the source in gcc should submit the patches 
> upstream and not burden the target maintainers with it.

This is impossible, sorry.
We do not know how to fix a platform we do not have access to
ourselves and we can not accept patches for upstream
other than by following the standard process because this will violate
the LLVM developer policy.


>  Or maybe having libsantizer as another project separate from gcc and LLVM 
> would be even better.

libsanitizer is essentially a separate project.
It lives in a separate svn tree (compiler-rt).
We've recently made a set of changes to allow the libsanitizer tests
to be run with an arbitrary compiler
(i.e. this could be GCC, or some other build of Clang, or any other
compiler that implements appropriate instrumentation).

Ideally for me, GCC would pull the sanitizer sources as "svn external"
and the merge will be simply a change of revision.

--kcc


>
> Thanks,
> Andrew
>
>
>>
>> Also, what's the story with x32 in LLVM?
>> Is there any chance you can set up a public build bot for x32 asan 
>> (upstream)?
>>
>>> On Mon, May 12, 2014 at 9:53 PM, H.J. Lu <hjl.to...@gmail.com> wrote:
>>> On Mon, May 12, 2014 at 4:20 AM, Konstantin Serebryany
>>> <konstantin.s.serebry...@gmail.com> wrote:
>>>> This is the first libsanitizer merge in 4.10 (the last merge was in
>>>> December 2013).
>>>>
>>>> Tested on Ubuntu 12.04 like this:
>>>> rm -rf */{*/,}libsanitizer && make -j 50
>>>> make -j 40 -C gcc check-g{cc,++}
>>>> RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} asan.exp' && \
>>>> make -j 40 -C gcc check-g{cc,++}
>>>> RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} tsan.exp' && \
>>>> make -j 40 -C gcc check
>>>> RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} ubsan.exp' && \
>>>> echo PASS
>>>>
>>>> 5 months' worth of changes may break any platform we are not testing 
>>>> ourselves
>>>> (that includes Ubuntu 12.04, 13.10, 14.04, Mac 10.9, Windows 7, Android 
>>>> ARM),
>>>> please help us test this patch on your favorite platform.
>>>>
>>>> Expected ChangeLog entries:
>>>> =============== gcc/testsuite/ChangeLog
>>>> 2014-05-XX  Kostya Serebryany  <k...@google.com>
>>>>
>>>>        * c-c++-common/tsan/mutexset1.c: Update the test to match
>>>>        upstream r208536.
>>>>        * g++.dg/asan/symbolize-callback-1.C: Delete the deprecated test.
>>>>
>>>> =============== libsanitizer/ChangeLog
>>>> 2014-05-XX  Kostya Serebryany  <k...@google.com>
>>>>
>>>>        * All source files: Merge from upstream r208536.
>>>>        * asan/Makefile.am (asan_files): Added new files.
>>>>        * asan/Makefile.in: Regenerate.
>>>>        * tsan/Makefile.am (tsan_files): Added new files.
>>>>        * tsan/Makefile.in: Regenerate.
>>>>        * sanitizer_common/Makefile.am (sanitizer_common_files): Added
>>>> new files.
>>>>        * sanitizer_common/Makefile.in: Regenerate.
>>>>
>>>> --kcc
>>>
>>> sanitizer_common/sanitizer_platform_limits_posix.h has
>>>
>>>  struct __sanitizer_timeb {
>>>    long time;
>>>    unsigned short millitm;
>>>    short timezone;
>>>    short dstflag;
>>>  };
>>>
>>> On Linux, timeb is
>>>
>>> struct timeb
>>>  {
>>>    time_t time; /* Seconds since epoch, as from `time'.  */
>>>    unsigned short int millitm; /* Additional milliseconds.  */
>>>    short int timezone; /* Minutes west of GMT.  */
>>>    short int dstflag; /* Nonzero if Daylight Savings Time used.  */
>>>  };
>>>
>>> For x32, long is 32-bit and time_t is 64-bit.  We need something
>>> like
>>>
>>> struct __sanitizer_timeb {
>>> #if defined(__x86_64__) && !defined(_LP64)
>>>    long long time;
>>> #else
>>>    long time;
>>> #endif
>>>
>>> similar to other places.
>>>
>>>
>>> --
>>> H.J.

Reply via email to