Re: Are memory safety and maximized data volatility mutually exclusive?
"Jonathan S. Shapiro" <[email protected]> Thu, 8 Oct 2015 13:02:27 -0700
| Newsgroups | gmane.comp.capabilities.general |
|---|---|
| Message-ID | <CAAP=3QO1ViXa81Z9nC7PriqEcMdYRa5kENyu_rb-Xgjd3uLkKA@mail.gmail.com> |
Not sure if the original got through. Sent from wrong address. :-) On Thursday, October 8, 2015, Jonathan S. Shapiro < [email protected]> wrote: > On Thursday, October 8, 2015, Scott Moore <[email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote: >> >> The language standards are quite nice about letting compilers elide code >> that looks like make-work (why write a zero to this memory if no one will >> read it in the future?). >> > > It's true that compilers can optimize this way, but only when the compiler > can *witness* that the write-zero is never consumed. Performing the zero > operation in a separately compiled procedure that is **NOT** specified by > the standard library (and therefore not elidable by the compiler based on > knowledge of the library specification) is generally sufficient. The > zeroing procedure will be conservative about use-after-store, and the call > to the zeroing procedure in a separately compiled object file cannot be > eluded because the compiler does not know in general what important side > effects may later occur. > > Though strange things can happen if the call to a side effecting procedure > is immediately followed by exit()... > > Jonathan > _______________________________________________ cap-talk mailing list [email protected] http://www.eros-os.org/mailman/listinfo/cap-talk