Compare commits

..
6 Commits
Author SHA1 Message Date
Rolf Bjarne Kvinge 9435de91f2 Fix gdb backtraces on OSX.
We can't redirect output from gdb: since gdb will suspend us we won't
be able to read from the pipe we've redirected output to, and we'll
end up deadlocking if gdb outputs a lot of data (see bug #2548).
2012-01-30 15:10:02 -05:00
Duncan Mak 1281853553 Bump version number to 2.10.9 2012-01-30 14:56:23 -05:00
Rolf Bjarne Kvinge 6922ed8629 Disable gdb backtracing until #2548 has been fixed. 2011-12-19 18:52:35 +01:00
Zoltan Varga cd3c79413a Fix List.LastIndexOf () on empty lists. Fixes #2558. 2011-12-19 12:21:58 +01:00
Duncan Mak bc36fbe193 Bump version number to 2.10.8.1. 2011-12-16 11:48:30 -05:00
Rodrigo Kumpera 53d8062782 Fix sgen 2011-12-16 12:03:18 -02:00
8 changed files with 17 additions and 39 deletions

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono,2.10.8)
AM_INIT_AUTOMAKE(mono,2.10.9)
AM_MAINTAINER_MODE
API_VER=2.0
@@ -467,6 +467,8 @@ namespace System.Collections.Generic {
public int LastIndexOf (T item)
{
if (_size == 0)
return -1;
return Array.LastIndexOf<T> (_items, item, _size - 1, _size);
}
@@ -1307,6 +1307,12 @@ namespace MonoTests.System.Collections.Generic {
Assert.IsTrue (e is ArgumentException, "#10");
}
}
[Test]
public void LastIndexOfEmpty_2558 () {
var l = new List<int> ();
Assert.AreEqual (-1, l.IndexOf (-1));
}
}
}
#endif
-2
View File
@@ -2503,14 +2503,12 @@ bridge_register_finalized_object (MonoObject *object)
static void
stw_bridge_process (void)
{
g_assert (mono_sgen_need_bridge_processing ());
mono_sgen_bridge_processing_stw_step ();
}
static void
bridge_process (void)
{
g_assert (mono_sgen_need_bridge_processing ());
mono_sgen_bridge_processing_finish ();
}
+2 -5
View File
@@ -226,16 +226,15 @@ mono_runtime_syscall_fork ()
return (pid_t) fork ();
}
gboolean
void
mono_gdb_render_native_backtraces (pid_t crashed_pid)
{
return FALSE; // disable for now due to #2548.
const char *argv [5];
char gdb_template [] = "/tmp/mono-gdb-commands.XXXXXX";
argv [0] = g_find_program_in_path ("gdb");
if (argv [0] == NULL) {
return FALSE;
return;
}
if (mkstemp (gdb_template) != -1) {
@@ -257,6 +256,4 @@ mono_gdb_render_native_backtraces (pid_t crashed_pid)
unlink (gdb_template);
}
return TRUE;
}
+3 -26
View File
@@ -2170,16 +2170,10 @@ mono_handle_native_sigsegv (int signal, void *ctx)
#if !defined(HOST_WIN32) && defined(HAVE_SYS_SYSCALL_H) && defined(SYS_fork)
if (!mini_get_debug_options ()->no_gdb_backtrace && !mono_debug_using_mono_debugger ()) {
/* From g_spawn_command_line_sync () in eglib */
int res;
int stdout_pipe [2] = { -1, -1 };
pid_t pid;
int status;
char buffer [1024];
pid_t crashed_pid = getpid ();
res = pipe (stdout_pipe);
g_assert (res != -1);
//pid = fork ();
/*
* glibc fork acquires some locks, so if the crash happened inside malloc/free,
@@ -2188,31 +2182,14 @@ mono_handle_native_sigsegv (int signal, void *ctx)
pid = mono_runtime_syscall_fork ();
if (pid == 0) {
close (stdout_pipe [0]);
dup2 (stdout_pipe [1], STDOUT_FILENO);
for (i = getdtablesize () - 1; i >= 3; i--)
close (i);
if (!mono_gdb_render_native_backtraces (crashed_pid))
close (STDOUT_FILENO);
dup2 (STDERR_FILENO, STDOUT_FILENO);
mono_gdb_render_native_backtraces (crashed_pid);
exit (1);
}
close (stdout_pipe [1]);
fprintf (stderr, "\nDebug info from gdb:\n\n");
while (1) {
int nread = read (stdout_pipe [0], buffer, 1024);
if (nread <= 0)
break;
write (STDERR_FILENO, buffer, nread);
}
waitpid (pid, &status, WNOHANG);
waitpid (pid, &status, 0);
}
#endif
/*
+2 -4
View File
@@ -635,7 +635,7 @@ mono_runtime_syscall_fork ()
#endif
}
gboolean
void
mono_gdb_render_native_backtraces (pid_t crashed_pid)
{
const char *argv [9];
@@ -643,7 +643,7 @@ mono_gdb_render_native_backtraces (pid_t crashed_pid)
argv [0] = g_find_program_in_path ("gdb");
if (argv [0] == NULL) {
return FALSE;
return;
}
argv [1] = "-ex";
@@ -657,8 +657,6 @@ mono_gdb_render_native_backtraces (pid_t crashed_pid)
argv [8] = 0;
execv (argv [0], (char**)argv);
return TRUE;
}
#endif
#endif /* __native_client__ */
+1 -1
View File
@@ -2400,7 +2400,7 @@ void mono_runtime_setup_stat_profiler (void) MONO_INTERNAL;
void mono_runtime_shutdown_stat_profiler (void) MONO_INTERNAL;
void mono_runtime_posix_install_handlers (void) MONO_INTERNAL;
pid_t mono_runtime_syscall_fork (void) MONO_INTERNAL;
gboolean mono_gdb_render_native_backtraces (pid_t crashed_pid) MONO_INTERNAL;
void mono_gdb_render_native_backtraces (pid_t crashed_pid) MONO_INTERNAL;
/*
* Signal handling