Turning a SIGSEGV into a regular function call under Linux, allowing throw

FeepingCreature default_357-line at yahoo.de
Wed Mar 14 06:43:24 PDT 2012


On 03/14/12 12:13, deadalnix wrote:
> Le 13/03/2012 23:24, Vladimir Panteleev a écrit :
>> I think something like this needs to end up in Druntime, at least for
>> Linux x86 and x64.
> 
> You are loosing EAX in the process.
It's somewhat unavoidable. One way or another, you need to find _some_ threadlocal spot to stick those extra size_t.sizeof bytes, since you mustn't lose data, but the hack works by _overwriting_ the return address.


More information about the Digitalmars-d mailing list