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


hst...@quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hst...@quickfur.ath.cx


--- Comment #6 from hst...@quickfur.ath.cx 2013-08-19 12:58:15 PDT ---
IMO DMD should somehow keep track of which template instantiations actually
require code to be emitted. If a template function only runs in CTFE but not at
runtime, that code shouldn't even be emitted in the first place.

Tho I understand that separate compilation may make this tricky. :)

One possible approach is to emit all template instantiations in a separate
static library that the linker can then selectively pull from. Linkers are
designed to only pull parts of the library that are actually referenced, so
this won't require massive compiler changes. Then we can both reduce template
bloat and avoid security issues like this one.

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

Reply via email to