Re: OS stopping stack buffer overflow exploits

From: Khimenko Victor (khim@sch57.msk.ru)
Date: Sun Jun 04 2000 - 11:49:37 EST


In <200006041042.MAA12176@oboe.it.uc3m.es> Peter T. Breuer (ptb@it.uc3m.es) wrote:
> "A month of sundays ago Florian Weimer wrote:"
>> The C and C++ frontends only generate trampolines if you use a GNU
>> extension (nested functions).

> And I have no idea why they should want to: nesting is purely a
> question of namespaces and syntactic scoping. It should impact
> the implementation semantics not at all.

Oh, yeah ? I eagerly wait your implementation of draw_table for sample
below without trampolines (just remember: you can not alter for_each or
use any information about it's implementation - there are exist sparate
compilation units, you know). Oh, and of course such implementation
should work in multi-threaded environment as well...

-- cut --
procedure for_each(_from,_to:integer;procedure _do(x:integer));
var
  i:integer;
begin
  for i:=_from to _to do
    _do(i);
end;

procedure draw_table;
var
  y:integer;
  procedure one_step(x:integer);
  begin
    write(x*y:4);
  end;
begin
  for y:=1 to 10 do begin
    for_each(1,10,one_step);
    writeln;
  end;
end;
begin
  draw_table;
end.
-- cut --

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:19 EST