[Issue 9243] Order locals to prevent buffer overflow attacks

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 30 03:45:14 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=9243



--- Comment #5 from bearophile_hugs at eml.cc 2012-12-30 03:44:40 PST ---
(In reply to comment #4)

> The complexity of D has nothing to do with the advanced'ness of the optimizer
> and back end. Dmc (which shares a back end with dmd) has had an advanced data
> flow analysis back end since around 1985. One of the things data flow analysis
> provides is a weighted usage graph of variables, which is used for register
> allocation and also for sharing stack space.

There are several different things that can be named "compiler", but for me and
normal programmers a "compiler" isn't just a back-end, it's the sum of
front-end plus a back-end. From Wikipedia
(http://en.wikipedia.org/wiki/Compiler ):

>The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a lower level language (e.g., assembly language or machine code).<


> I think it was last week that LLVM announced its latest version is using
> coloring information for stack layout - about 20 years behind dmc/dmd.

Life is complex, reading the text of the LLVM changelog is not enough to say X
is better than Y. So you should write some benchmarks and compare between LLVM
and Dmc the performance, both in compilation speed and in the number of spilled
registers.


> Please check what dmd does before defaulting to assuming it does not.

I am doing my best.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list