summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--txr.c4
2 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4a5e2754..dea783b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2009-12-03 Kaz Kylheku <kkylheku@gmail.com>
+
+ Fix for failing test suite on MIPS machine, due to
+ gc failing to mark a local variable in txr_main.
+
+ * txr.c (txr_main): Changed from internal linkage to external.
+ This prevents gcc -O2 from inlining txr_main into main.
+ We need separate stack frames for main and txr_main,
+ in order to be sure that when walking to the bottom of
+ stack pointer, we visit all locals in main. This is the
+ whole reason why there is a separate txr_main.
+
2009-12-02 Kaz Kylheku <kkylheku@gmail.com>
* Makefile (tests): Don't depend on the executable. Otherwise,
diff --git a/txr.c b/txr.c
index 83ef0233..2d692bc9 100644
--- a/txr.c
+++ b/txr.c
@@ -138,7 +138,7 @@ static val remove_hash_bang_line(val spec)
}
}
-static int txr_main(int argc, char **argv);
+int txr_main(int argc, char **argv);
int main(int argc, char **argv)
{
@@ -148,7 +148,7 @@ int main(int argc, char **argv)
return txr_main(argc, argv);
}
-static int txr_main(int argc, char **argv)
+int txr_main(int argc, char **argv)
{
val specstring = nil;
val spec = nil;