[Issue 9243] Order locals to prevent buffer overflow attacks

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 29 21:59:19 PST 2012


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



--- Comment #4 from Walter Bright <bugzilla at digitalmars.com> 2012-12-29 21:59:11 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> 
> > Dmd already does this using graph coloring. I guess dmd is advanced? :-)
> 
> Despite in some cases DMD compiles in a sub-optimal way compared to LDC/GDC,
> given the complexity of D language DMD is surely an advanced compiler.

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.

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.

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

-- 
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