Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* stack non-executable on osf/1?
@ 1997-11-27  5:00 Sonia Ivanova,Varna Bulgaria
  0 siblings, 0 replies; only message in thread
From: Sonia Ivanova,Varna Bulgaria @ 1997-11-27  5:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 843 bytes --]



Hi,

anyone here has any idea whether OSF/1 can execute code on the stack,
and if so, how? i wrote the following simple piece of code to test that:

        main() �
          int x = 0x47ff041f; /* nop */
          void (*f) () = (void *) &x;
          f();
        �


when that is run, it gets a SIGSEGV when executing the 'nop' instruction.
while, if x was declared 'static', it gets a SIGSEGV when executing the
instruction following the nop (this can be verified by examining the
coredump). from that i'd say that the data segment is executable, while
the stack segment isn't. however, according to the DEC OSF/1 Assembly
Language Programmer's Guide, both the stack and the data segments are
supposed to be executable. so i thought i might be doing something wrong.
if anyone has any ideas about this, please let me know.

sonia



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-11-27  5:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-11-27  5:00 stack non-executable on osf/1? Sonia Ivanova,Varna Bulgaria

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox