Stack size assumption

Doug Simon <>
15 Jun 1999 00:26:58 -0400

          From comp.compilers

Related articles
Stack size assumption (Doug Simon) (1999-06-15)
| List of all articles for this month |

From: Doug Simon <>
Newsgroups: comp.compilers
Date: 15 Jun 1999 00:26:58 -0400
Organization: Department of Computer Science and Electrical Engineering, The University of Queensland
Keywords: code, question, comment

Is it reasonable to assume that any compiler generated object code
will ensure that the stack size at a given instruction is exactly the
same no matter which control flow path was taken to reach that
instruction. I know that this is enforced by the Java bytecode
verifier but am wondering if any such assumption can be made of native

[Depends on your language. If you have either variable sized arrays or
routines like alloca(), the answer is no. That's why most calling
sequences have separate stack and frame pointers, so you don't need to
track the stack pointer to produce correct code. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.