Patchwork [libsanitizer] merge rev 182922 (helps running under qemu)

login
register
mail settings
Submitter Christophe Lyon
Date May 31, 2013, 2:42 p.m.
Message ID <CAKdteOZKrbBUmSPPsyPSH6Ji+c=1-y+u7nnr7wkWcb_zTBUWCw@mail.gmail.com>
Download mbox | patch
Permalink /patch/247970/
State New
Headers show

Comments

Christophe Lyon - May 31, 2013, 2:42 p.m.
Hi,

I'd like to backport libsanitizer commit #182922:

It helps handling qemu's output for /proc/self/maps until the
corresponding patch in qemu is available to developers (it has been
accepted, but not part of a release yet).

OK to commit in trunk?

Thanks,

Christophe
Jack Howarth - May 31, 2013, 2:49 p.m.
On Fri, May 31, 2013 at 04:42:21PM +0200, Christophe Lyon wrote:
> Hi,
> 
> I'd like to backport libsanitizer commit #182922:
> Index: sanitizer_common/sanitizer_linux.cc
> ===================================================================
> --- sanitizer_common/sanitizer_linux.cc    (revision 199453)
> +++ sanitizer_common/sanitizer_linux.cc    (working copy)
> @@ -410,7 +410,9 @@ bool MemoryMappingLayout::Next(uptr *sta
>    CHECK_EQ(*current_++, ' ');
>    while (IsDecimal(*current_))
>      current_++;
> -  CHECK_EQ(*current_++, ' ');
> +  // Qemu may lack the trailing space.
> +  // http://code.google.com/p/address-sanitizer/issues/detail?id=160
> +  // CHECK_EQ(*current_++, ' ');
>    // Skip spaces.
>    while (current_ < next_line && *current_ == ' ')
>      current_++;
> 
> It helps handling qemu's output for /proc/self/maps until the
> corresponding patch in qemu is available to developers (it has been
> accepted, but not part of a release yet).
> 
> OK to commit in trunk?

Christophe,
   I believe that changes from upstream are generally brought into FSF gcc with a 
complete merge of libsanitizer rather than just specific patches. We do seem
to be long past due for remerge with upstream though.
            Jack

> 
> Thanks,
> 
> Christophe
Konstantin Serebryany - May 31, 2013, 2:53 p.m.
On Fri, May 31, 2013 at 6:49 PM, Jack Howarth <howarth@bromo.med.uc.edu> wrote:
> On Fri, May 31, 2013 at 04:42:21PM +0200, Christophe Lyon wrote:
>> Hi,
>>
>> I'd like to backport libsanitizer commit #182922:
>> Index: sanitizer_common/sanitizer_linux.cc
>> ===================================================================
>> --- sanitizer_common/sanitizer_linux.cc    (revision 199453)
>> +++ sanitizer_common/sanitizer_linux.cc    (working copy)
>> @@ -410,7 +410,9 @@ bool MemoryMappingLayout::Next(uptr *sta
>>    CHECK_EQ(*current_++, ' ');
>>    while (IsDecimal(*current_))
>>      current_++;
>> -  CHECK_EQ(*current_++, ' ');
>> +  // Qemu may lack the trailing space.
>> +  // http://code.google.com/p/address-sanitizer/issues/detail?id=160
>> +  // CHECK_EQ(*current_++, ' ');
>>    // Skip spaces.
>>    while (current_ < next_line && *current_ == ' ')
>>      current_++;
>>
>> It helps handling qemu's output for /proc/self/maps until the
>> corresponding patch in qemu is available to developers (it has been
>> accepted, but not part of a release yet).
>>
>> OK to commit in trunk?
>
> Christophe,
>    I believe that changes from upstream are generally brought into FSF gcc with a
> complete merge of libsanitizer rather than just specific patches. We do seem
> to be long past due for remerge with upstream though.
>             Jack

That's correct, however I specifically asked to commit this patch
directly to gcc.
The same patch is already in upstream repo.
Unless anyone objects, this patch is OK to commit.

I am not planing any new merge from upstream to GCC in the nearest
couple of months, unless someone has a good reason to do that.
Most likely, the next merge will go when we have LeakSanitizer (leak
detector) in stable shape.

--kcc



>
>>
>> Thanks,
>>
>> Christophe
Christophe Lyon - June 3, 2013, 1:05 p.m.
Hi,
Just committed as r199606.

Thanks
Christophe.


On 31 May 2013 16:53, Konstantin Serebryany
<konstantin.s.serebryany@gmail.com> wrote:
> On Fri, May 31, 2013 at 6:49 PM, Jack Howarth <howarth@bromo.med.uc.edu> wrote:
>> On Fri, May 31, 2013 at 04:42:21PM +0200, Christophe Lyon wrote:
>>> Hi,
>>>
>>> I'd like to backport libsanitizer commit #182922:
>>> Index: sanitizer_common/sanitizer_linux.cc
>>> ===================================================================
>>> --- sanitizer_common/sanitizer_linux.cc    (revision 199453)
>>> +++ sanitizer_common/sanitizer_linux.cc    (working copy)
>>> @@ -410,7 +410,9 @@ bool MemoryMappingLayout::Next(uptr *sta
>>>    CHECK_EQ(*current_++, ' ');
>>>    while (IsDecimal(*current_))
>>>      current_++;
>>> -  CHECK_EQ(*current_++, ' ');
>>> +  // Qemu may lack the trailing space.
>>> +  // http://code.google.com/p/address-sanitizer/issues/detail?id=160
>>> +  // CHECK_EQ(*current_++, ' ');
>>>    // Skip spaces.
>>>    while (current_ < next_line && *current_ == ' ')
>>>      current_++;
>>>
>>> It helps handling qemu's output for /proc/self/maps until the
>>> corresponding patch in qemu is available to developers (it has been
>>> accepted, but not part of a release yet).
>>>
>>> OK to commit in trunk?
>>
>> Christophe,
>>    I believe that changes from upstream are generally brought into FSF gcc with a
>> complete merge of libsanitizer rather than just specific patches. We do seem
>> to be long past due for remerge with upstream though.
>>             Jack
>
> That's correct, however I specifically asked to commit this patch
> directly to gcc.
> The same patch is already in upstream repo.
> Unless anyone objects, this patch is OK to commit.
>
> I am not planing any new merge from upstream to GCC in the nearest
> couple of months, unless someone has a good reason to do that.
> Most likely, the next merge will go when we have LeakSanitizer (leak
> detector) in stable shape.
>
> --kcc
>
>
>
>>
>>>
>>> Thanks,
>>>
>>> Christophe

Patch

Index: sanitizer_common/sanitizer_linux.cc
===================================================================
--- sanitizer_common/sanitizer_linux.cc    (revision 199453)
+++ sanitizer_common/sanitizer_linux.cc    (working copy)
@@ -410,7 +410,9 @@  bool MemoryMappingLayout::Next(uptr *sta
   CHECK_EQ(*current_++, ' ');
   while (IsDecimal(*current_))
     current_++;
-  CHECK_EQ(*current_++, ' ');
+  // Qemu may lack the trailing space.
+  // http://code.google.com/p/address-sanitizer/issues/detail?id=160
+  // CHECK_EQ(*current_++, ' ');
   // Skip spaces.
   while (current_ < next_line && *current_ == ' ')
     current_++;