8 ms·
But in fact no modern processor/OS executes this either. Pages are marked as executable or not, and static data is loaded as non-executable pages.
by tlb 4mo ago
But in fact no modern processor/OS executes this either. Pages are marked as executable or not, and static data is loaded as non-executable pages.
- dmitrygr 4mo agothat is why it was not "static const char buf[]" ;) it was not an accident executable stacks are still common (incl on windows with some settings), and sometimes they are required (eg for gcc nested functions)
- diamondlovesyou 4mo agoThat won't be located on the stack either. The underlying buffer will be a TU local - ie static and not rx