[llvm-commits] [compiler-rt] r167462 - /compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc
Dmitry Vyukov
dvyukov at google.com
Tue Nov 6 07:56:18 PST 2012
done. thnx
On Tue, Nov 6, 2012 at 7:50 PM, Alexey Samsonov <samsonov at google.com> wrote:
>
>
> On Tue, Nov 6, 2012 at 7:39 PM, Dmitry Vyukov <dvyukov at google.com> wrote:
>
>> Author: dvyukov
>> Date: Tue Nov 6 09:39:16 2012
>> New Revision: 167462
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=167462&view=rev
>> Log:
>> tsan: better diagnostics for failed mmap()
>>
>> Modified:
>> compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc
>>
>> Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc
>> URL:
>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc?rev=167462&r1=167461&r2=167462&view=diff
>>
>> ==============================================================================
>> --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc (original)
>> +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc Tue Nov 6
>> 09:39:16 2012
>> @@ -74,10 +74,14 @@
>> }
>>
>> void *MmapFixedNoReserve(uptr fixed_addr, uptr size) {
>> - return internal_mmap((void*)fixed_addr, size,
>> + void *p = internal_mmap((void*)fixed_addr, size,
>> PROT_READ | PROT_WRITE,
>> MAP_PRIVATE | MAP_ANON | MAP_FIXED | MAP_NORESERVE,
>> -1, 0);
>> + if (p != (void*)fixed_addr)
>> + Report("ERROR: Failed to deallocate 0x%zx (%zd) bytes at address %p
>> (%d)\n",
>> + size, size, fixed_addr, errno);
>>
>
> deallocate?
>
>
>> + return p;
>> }
>>
>> void *Mprotect(uptr fixed_addr, uptr size) {
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
>
>
> --
> Alexey Samsonov, MSK
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121106/cea51629/attachment.html>
More information about the llvm-commits
mailing list