[cfe-dev] increase size of function pointer?
Reid Kleckner
reid.kleckner at gmail.com
Thu Jun 2 09:23:37 PDT 2011
What's your overall goal? If you want to be able to use page
protection to detect calls through function pointers, it seems like a
dynamic instrumentation tool like Pin or DynamoRIO would be a better
way to go. Just find all indirect call instructions and instrument
them.
Reid
On Wed, Jun 1, 2011 at 11:50 PM, ret val <retval386 at gmail.com> wrote:
> I mean pointers to functions unfortunately. I guess this will be more
> interesting that I thought. Any specific advice?
> Thank again
> On Wed, Jun 1, 2011 at 5:55 PM, John McCall <rjmccall at apple.com> wrote:
>>
>> On Jun 1, 2011, at 12:48 PM, ret val wrote:
>> > I would like to be able to increase the size allocated for normal
>> > function pointers so they each fill a entire (virtual memory) page.
>>
>> Do you mean that you want each *function* to occupy its own
>> VM page, or do you really mean that you want function *pointers*
>> to grow from 4-8 bytes apiece to 4KB?
>>
>> The best way of doing the former is to specify a huge alignment for
>> the function. The latter is likely to break a lot of code that assumes
>> (yes, technically contrary to the standards) that function pointers
>> can be losslessly cast to, say, void*.
>>
>> John.
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
More information about the cfe-dev
mailing list