This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PCH and exec-shield...


Mike Stump wrote:

On Monday, March 8, 2004, at 01:04 PM, Mark Mitchell wrote:

There is a more general approach used by other PCH implementations which involves walking the loaded PCH and swizzling pointers. That would be a superior approach as it would make PCH more robust on all platforms, and would permit people to use exec-shield randomization (and similar features on other operating systems) with PCH.

Until that is implemented, many people will probably complain that PCH is broken.


Using a feature that serves no purpose other than to slow down compilations can reasonably be considered a bug. By having PCH swizzle on load, we permit the introductions of bugs into the compiler. This is bad. This is why it hasn't been done.

For robustness we should fall back to the normal .h file and pretend the PCH file doesn't exist. I think we might just give a sorry now, that might be wrong.

I agree that falling back to the normal .h file would be much better than giving an error message.


But, there is good evidence (EDG's implementation) that swizzling is often much faster than reparsing. And, on some systems it's the only option; the system does not reliably place things at the same addresses on multiple executions. An approach that tries to put things at the same addresses, but then falls back to swizzling if necessary, would provide a better user experience than your approach, all other things being equal.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]