[fpc-pascal] Re: Get all caller adresses of a given function/procedure before executing

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Thu Aug 16 10:50:25 CEST 2012


Lukasz Sokol wrote:

>> Please explain.
>> I do not change the code. I am only searching some pointers.
>>
> Well, yeah, _you_ don't. What if somebody else could create a program that extracts
> private (unexported) function pointers from executables and be able to redirect 
> entire code paths. Oh wait. this is called executable infection and great deal of 
> people actually _do_ that.

In fairness, he has said that this is for his own use. And insofar as 
FPC is a general-purpose tool we should acknowledge that "there's more 
than one way to do it".

If anybody is worrying, it should be his professional successors (i.e. 
whoever inherits the value or liability of his code should he fall under 
a tram). Or, for that matter, his customers or associates who by now can 
see everybody telling him that his technique is questionable (this is, 
after all, a public mailing list).

> So you think maintaining your own disassembler is easier, more stable and
> less maintenance than scanning the source? 

He apparently does. And writing as somebody who does disassemblers for 
various CPUs and platforms, I think he's deluded.

I wonder what would happen if somebody tried to run the code on an OS 
that protects executable code from being read?

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list