aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl
diff options
context:
space:
mode:
authorraziel-2014-08-08 14:06:40 +0300
committerD G Turner2014-08-08 13:43:59 +0100
commitcbae401a797ffbb262cf05f0707da41f3483d6ee (patch)
tree1998cadb501b39667ccea77cd1beb91379f6883f /backends/platform/sdl
parent38f7a9bc705f6b79e21d229dc40afcf6decfc241 (diff)
downloadscummvm-rg350-cbae401a797ffbb262cf05f0707da41f3483d6ee.tar.gz
scummvm-rg350-cbae401a797ffbb262cf05f0707da41f3483d6ee.tar.bz2
scummvm-rg350-cbae401a797ffbb262cf05f0707da41f3483d6ee.zip
AMIGAOS: Add a stack cookie
Setting up a static stack to avoid crashes from a stack set too low.
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r--backends/platform/sdl/amigaos/amigaos-main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/backends/platform/sdl/amigaos/amigaos-main.cpp b/backends/platform/sdl/amigaos/amigaos-main.cpp
index 0743b3f9a0..65da6bbf85 100644
--- a/backends/platform/sdl/amigaos/amigaos-main.cpp
+++ b/backends/platform/sdl/amigaos/amigaos-main.cpp
@@ -30,6 +30,9 @@
int main(int argc, char *argv[]) {
+ // Set up a stack cookie to avoid crashes due to too few stack set by users
+ static const char *stack_cookie __attribute__((used)) = "$STACK: 600000";
+
// Create our OSystem instance
g_system = new OSystem_AmigaOS();
assert(g_system);