Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: lovegirl@mail.freenet.hut.fi (Sonia Ivanova,Varna Bulgaria)
Subject: stack non-executable on osf/1?
Date: 1997/11/27	[thread overview]
Message-ID: <65k1pf$jgk$1@learnet.freenet.hut.fi> (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



                 reply	other threads:[~1997-11-27  5:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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