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: [3.3 regression?] flag_hosted and back-ends


> Using trampolines is a viable approach if you are prepared to deal with 
> the issues it raises -- and lets avoid the discussion about security holes 
> and enabling execution of the stack...

In fact this issue has been the major issue in GNAT, particularly on 
Solaris, where several universities, though so far almost no users outside
universities, enable stack protection by default.

> So in Ada it makes sense to make all pointers a couplet of values.  In C 
> it doesn't.

Precisely my point, though as time goes by, trampolines become more and
more of a nuisance. Of course on some machines GNU C does not use
trampolines (because the ABI provides for fat procedure pointers).
Of course if people really started using GNU C in the style normally used
in practice for languages with nested procedures, then that would be almost
a different language, and for that language the choice might change.

> Well, any processor/OS combination with execution protection on the stack, 
> or any processor with harvard stacks and no user-level way of syncronising 
> them is going to need help from the OS.  Pretending that trampolines will 
> work on every platform without OS support just because the work on some 
> doesn't lead us anywhere helpful.

No one is pretending that, it is quite evident that on some platforms
OS support is required. My message simply pointed out that this is not
the case on all platforms. So I would turn your message around "pretending
that OS support is required on every platform doesn't lead us anywhere
helpful".


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