Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Side by Side Diff: chrome/test/pyautolib/asan_stub.c

Issue 11418195: Clean up a few -faddress-sanitizer stragglers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | tools/clang/scripts/update.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Fake Address Sanitizer run-time support. 5 // Fake Address Sanitizer run-time support.
6 // Enough for programs to link and run, but will not find any errors. 6 // Enough for programs to link and run, but will not find any errors.
7 // Also, linking this to shared libraries voids the warranty. 7 // Also, linking this to shared libraries voids the warranty.
8 // 8 //
9 // We need this fake thunks if we build Chrome with ASAN support because 9 // We need this fake thunks if we build Chrome with ASAN support because
10 // pyautolib DSO is instrumented with ASAN and is loaded to regular python 10 // pyautolib DSO is instrumented with ASAN and is loaded to regular python
11 // process that has no ASAN runtime. 11 // process that has no ASAN runtime.
12 // 12 //
13 // We have three options here: 13 // We have three options here:
14 // 1) use our custom build of Python that have ASAN runtime linked in, 14 // 1) use our custom build of Python that have ASAN runtime linked in,
15 // 2) do not instrument pyautolib with ASAN support, 15 // 2) do not instrument pyautolib with ASAN support,
16 // 3) use this fake asan thunks linked to pyautolib so that instrumented code 16 // 3) use this fake asan thunks linked to pyautolib so that instrumented code
17 // does not complain. 17 // does not complain.
18 // 18 //
19 // Note that we should not use real ASAN runtime linked with DSO because it will 19 // Note that we should not use real ASAN runtime linked with DSO because it will
20 // not have information about memory allocations made prior to DSO load. 20 // not have information about memory allocations made prior to DSO load.
21 // 21 //
22 // Option (2) is not easy because pyautolib uses code from Chrome 22 // Option (2) is not easy because pyautolib uses code from Chrome
23 // (see chrome_tests.gypi, dependencies for target_name: pyautolib) that 23 // (see chrome_tests.gypi, dependencies for target_name: pyautolib) that
24 // has been instrumented with ASAN. So even if we disable -faddress-sanitizer 24 // has been instrumented with ASAN. So even if we disable -sanitize=address
25 // for pyautolib own sources, ASAN instrumentation will creep in from there. 25 // for pyautolib own sources, ASAN instrumentation will creep in from there.
26 // To avoid ASAN instrumentation, we might force Chrome build to compile all our 26 // To avoid ASAN instrumentation, we might force Chrome build to compile all our
27 // dependencies one more time without -faddress-sanitizer. 27 // dependencies one more time without -fsanitize=address.
28 // 28 //
29 // Note also that using these empty stubs prevents ASAN from catching bugs in 29 // Note also that using these empty stubs prevents ASAN from catching bugs in
30 // Python-pyautolib process. But we do not need it, we are interested in Chrome 30 // Python-pyautolib process. But we do not need it, we are interested in Chrome
31 // bugs. 31 // bugs.
32 32
33 33
34 #include <stdio.h> 34 #include <stdio.h>
35 #include <stdlib.h> 35 #include <stdlib.h>
36 #include <sys/mman.h> 36 #include <sys/mman.h>
37 37
(...skipping 29 matching lines...) Expand all
67 void __asan_report_load2() { } 67 void __asan_report_load2() { }
68 void __asan_report_load4() { } 68 void __asan_report_load4() { }
69 void __asan_report_load8() { } 69 void __asan_report_load8() { }
70 void __asan_report_load16() { } 70 void __asan_report_load16() { }
71 void __asan_report_store1() { } 71 void __asan_report_store1() { }
72 void __asan_report_store2() { } 72 void __asan_report_store2() { }
73 void __asan_report_store4() { } 73 void __asan_report_store4() { }
74 void __asan_report_store8() { } 74 void __asan_report_store8() { }
75 void __asan_report_store16() { } 75 void __asan_report_store16() { }
76 void __asan_set_error_report_callback() { } 76 void __asan_set_error_report_callback() { }
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | tools/clang/scripts/update.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698