[compiler-rt] r212979 - Add support for intercepting thunks of the form

Timur Iskhodzhanov timurrrr at google.com
Tue Jul 15 09:20:38 PDT 2014


The way to test this function is basically to run helloworld (or any
other simple app) with the appropriate version of CRT linked in.  If
it doesn't crash and other asan tests work, the change is
fine.  That said, check-asan is enough provided you have the correct
CRT on you LIB.

2014-07-15 20:11 GMT+04:00 Ehsan Akhgari <ehsan.akhgari at gmail.com>:
> On Tue, Jul 15, 2014 at 12:01 PM, David Blaikie <dblaikie at gmail.com> wrote:
>>
>> On Mon, Jul 14, 2014 at 7:41 PM, Ehsan Akhgari <ehsan.akhgari at gmail.com>
>> wrote:
>> > On Mon, Jul 14, 2014 at 10:34 PM, David Blaikie <dblaikie at gmail.com>
>> > wrote:
>> >>
>> >> On Mon, Jul 14, 2014 at 1:28 PM, Ehsan Akhgari
>> >> <ehsan.akhgari at gmail.com>
>> >> wrote:
>> >> > Author: ehsan
>> >> > Date: Mon Jul 14 15:28:21 2014
>> >> > New Revision: 212979
>> >> >
>> >> > URL: http://llvm.org/viewvc/llvm-project?rev=212979&view=rev
>> >> > Log:
>> >> > Add support for intercepting thunks of the form
>> >>
>> >> Is this a complete commit message (or a complete commit? Missing
>> >> tests?)?
>> >
>> >
>> > No, sorry, this commit used to have "`jmp dword ptr ds:[WWZZYYXX]`"
>> > after
>> > it, but either git or git svn ate that part, and I didn't realize.  The
>> > code
>> > changes are complete.
>>
>> Is there test coverage for this? Any way to add it?
>
>
> No, I don't know of a way to test this, and I couldn't find any existing
> tests for the rest of the cases.  Timur, do you know if there is a way to
> test this?
>
> --
> Ehsan
> <http://ehsanakhgari.org/>
>
>
>>
>> >
>> > Cheers,
>> > --
>> > Ehsan
>> > <http://ehsanakhgari.org/>
>> >
>> >>
>> >> >
>> >> > Modified:
>> >> >     compiler-rt/trunk/lib/interception/interception_win.cc
>> >> >
>> >> > Modified: compiler-rt/trunk/lib/interception/interception_win.cc
>> >> > URL:
>> >> >
>> >> > http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/interception/interception_win.cc?rev=212979&r1=212978&r2=212979&view=diff
>> >> >
>> >> >
>> >> > ==============================================================================
>> >> > --- compiler-rt/trunk/lib/interception/interception_win.cc (original)
>> >> > +++ compiler-rt/trunk/lib/interception/interception_win.cc Mon Jul 14
>> >> > 15:28:21 2014
>> >> > @@ -113,6 +113,7 @@ static size_t RoundUpToInstrBoundary(siz
>> >> >          cursor += 3;
>> >> >          continue;
>> >> >        case 0xC1F7:  // F7 C1 XX YY ZZ WW = test ecx, WWZZYYXX
>> >> > +      case 0x25FF:  // FF 25 XX YY ZZ WW = jmp dword ptr
>> >> > ds:[WWZZYYXX]
>> >> >          cursor += 6;
>> >> >          continue;
>> >> >        case 0x3D83:  // 83 3D XX YY ZZ WW TT = cmp TT, WWZZYYXX
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > llvm-commits mailing list
>> >> > llvm-commits at cs.uiuc.edu
>> >> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>> >
>> >
>
>



More information about the llvm-commits mailing list