From acb624f05cd7b9cf6ad1dd932003c4dc83a98344 Mon Sep 17 00:00:00 2001 From: kumpera Date: Mon, 22 Mar 2010 20:36:39 +0000 Subject: [PATCH] 2010-03-22 Rodrigo Kumpera * driver.c (mono_main): Don't free global codeman under linux * since glic now peeks at code on stack for more archs than just amd64. git-svn-id: svn+ssh://mono-cvs.ximian.com/source/trunk/mono@154013 e3ebcda4-bce8-0310-ba0a-eca2169e7518 --- mono/mini/ChangeLog | 4 ++++ mono/mini/driver.c | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog index 32cfbbd0c..e1bc206f4 100755 --- a/mono/mini/ChangeLog +++ b/mono/mini/ChangeLog @@ -1,3 +1,7 @@ +2010-03-22 Rodrigo Kumpera + + * driver.c (mono_main): Don't free global codeman under linux since + glic now peeks at code on stack for more archs than just amd64. Mon Mar 22 18:09:09 CET 2010 Paolo Molaro diff --git a/mono/mini/driver.c b/mono/mini/driver.c index 3607a96ba..b5581274a 100644 --- a/mono/mini/driver.c +++ b/mono/mini/driver.c @@ -1770,6 +1770,7 @@ mono_main (int argc, char* argv[]) * shut down), it will crash: * http://mail-archives.apache.org/mod_mbox/harmony-dev/200801.mbox/%3C200801130327.41572.gshimansky@apache.org%3E * Testcase: tests/main-exit-background-change.exe. + * Testcase: test/main-returns-background-abort-resetabort.exe. * To make this race less frequent, we avoid freeing the global code manager. * Since mono_main () is hopefully only used by the runtime executable, this * will only cause a shutdown leak. This workaround also has the advantage @@ -1777,8 +1778,11 @@ mono_main (int argc, char* argv[]) * FIXME: Fix this properly by waiting for threads to really exit using * pthread_join (). This cannot be done currently as the io-layer calls * pthread_detach (). + * + * This used to be an amd64 only crash, but it looks like now most glibc targets do unwinding + * that requires reading the target code. */ -#ifdef __x86_64__ +#ifdef __linux__ mono_dont_free_global_codeman = TRUE; #endif -- 2.11.4.GIT