Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2014-04

OT: Code generation

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mark Morgan Lloyd

Knowing that there are some good compiler guys in here: does anybody remember a paper and set of patches for GCC that randomises register allocation and makes random choices for the code generator (e.g. zero a register either by xor a,a or sub a,a etc.) in order to give buffer overflows less to bite on? Any URLs etc. would be much appreciated.

Could such a thing be done for FPC? :-)

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Nikolay Nikolov
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 8 lines
Knowing that there are some good compiler guys in here: does anybody remember a paper and set of patches for GCC that randomises register allocation and makes random choices for the code generator (e.g. zero a register either by xor a,a or sub a,a etc.) in order to give buffer overflows less to bite on? Any URLs etc. would be much appreciated. Could such a thing be done for FPC? :-)

For FPC I think it's better for security critical code to use only the managed datastructures (strings, dynarrays) and compile it with range checking on (and perhaps even overflow checking).

Nikolay

Reply by email

Mark Morgan Lloyd
to Mark Morgan Lloyd: Knowing that there are some good compiler guys in here: does anybody remember a paper and…
Mark Morgan Lloyd wrote 5 lines
Knowing that there are some good compiler guys in here: does anybody remember a paper and set of patches for GCC that randomises register allocation and makes random choices for the code generator (e.g. zero a register either by xor a,a or sub a,a etc.) in order to give buffer overflows less to bite on? Any URLs etc. would be much appreciated.

I suspect I was thinking of CASPER
www.dtic.mil/dtic/tr/fulltext/u2/a446095.pdf although my recollection of its mode of operation was wrong.

Apologies for not having been aware of certain directly-relevant European papers before asking.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email