Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2399)

Issue 5844058: [ASan] set larger alignment for ASan mapping constants (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 9 months ago by samsonov
Modified:
12 years, 9 months ago
Reviewers:
kcc1, glider, kcc
CC:
Evgeniy Stepanov, dvyukov, llvm-commits_cs.uiuc.edu
Base URL:
https://llvm.org/svn/llvm-project/llvm/trunk/
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -0 lines) Patch
M lib/Transforms/Instrumentation/AddressSanitizer.cpp View 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 4
samsonov
12 years, 9 months ago (2012-03-19 10:00:30 UTC) #1
kcc1
I would just disable these two globals -- they are used only for experiments right ...
12 years, 9 months ago (2012-03-19 16:11:34 UTC) #2
glider
How about adding a flag that enables emitting them? On Mon, Mar 19, 2012 at ...
12 years, 9 months ago (2012-03-19 16:23:09 UTC) #3
kcc1
12 years, 9 months ago (2012-03-19 16:47:11 UTC) #4
On Mon, Mar 19, 2012 at 9:22 AM, Alexander Potapenko <glider@google.com>wrote:

> How about adding a flag that enables emitting them?
>

there were flags that controlled their values, now the same flags are used
to also control their presence.
r153040.

--kcc


>
> On Mon, Mar 19, 2012 at 8:11 PM, Kostya Serebryany <kcc@google.com> wrote:
> > I would just disable these two globals -- they are used only for
> experiments
> > right now.
> > Let me do the change.
> >
> > --kcc
> >
> >
> > On Mon, Mar 19, 2012 at 3:00 AM, <samsonov@google.com> wrote:
> >>
> >> Reviewers: kcc,
> >>
> >>
> >>
> >> Please review this at http://codereview.appspot.com/5844058/
> >>
> >> Affected files:
> >>   M     lib/Transforms/Instrumentation/AddressSanitizer.cpp
> >>
> >>
> >> Index: lib/Transforms/Instrumentation/AddressSanitizer.cpp
> >> ===================================================================
> >> --- lib/Transforms/Instrumentation/AddressSanitizer.cpp (revision
> 153031)
> >> +++ lib/Transforms/Instrumentation/AddressSanitizer.cpp (working copy)
> >> @@ -62,6 +62,7 @@
> >>  static const char *kAsanHandleNoReturnName = "__asan_handle_no_return";
> >>  static const char *kAsanMappingOffsetName = "__asan_mapping_offset";
> >>  static const char *kAsanMappingScaleName = "__asan_mapping_scale";
> >> +static const int   kAsanMappingConstantsAlignment = 1 << 5;
> >>  static const char *kAsanStackMallocName = "__asan_stack_malloc";
> >>  static const char *kAsanStackFreeName = "__asan_stack_free";
> >>
> >> @@ -584,10 +585,12 @@
> >>        new GlobalVariable(M, IntptrTy, true,
> >> GlobalValue::LinkOnceODRLinkage,
> >>                       ConstantInt::get(IntptrTy, MappingOffset),
> >>                       kAsanMappingOffsetName);
> >> +  asan_mapping_offset->setAlignment(kAsanMappingConstantsAlignment);
> >>    GlobalValue *asan_mapping_scale =
> >>        new GlobalVariable(M, IntptrTy, true,
> >> GlobalValue::LinkOnceODRLinkage,
> >>                           ConstantInt::get(IntptrTy, MappingScale),
> >>                           kAsanMappingScaleName);
> >> +  asan_mapping_scale->setAlignment(kAsanMappingConstantsAlignment);
> >>    // Read these globals, otherwise they may be optimized away.
> >>    IRB.CreateLoad(asan_mapping_scale, true);
> >>    IRB.CreateLoad(asan_mapping_offset, true);
> >>
> >>
> >> _______________________________________________
> >> llvm-commits mailing list
> >> llvm-commits@cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits@cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
>
>
>
> --
> Alexander Potapenko
> Software Engineer
> Google Moscow
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b