diff options
Diffstat (limited to 'debian/patches/exec_fix.patch')
-rw-r--r-- | debian/patches/exec_fix.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/debian/patches/exec_fix.patch b/debian/patches/exec_fix.patch new file mode 100644 index 00000000..00c88d42 --- /dev/null +++ b/debian/patches/exec_fix.patch @@ -0,0 +1,30 @@ +Fixes long-standing random hang of exec. + +2009-05-25 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * exec.c (finish): Set FILE_DATA and MAP_BUFFER members of E to NULL + after freeing them. + +Index: exec/exec.c +=================================================================== +RCS file: /cvsroot/hurd/hurd/exec/exec.c,v +retrieving revision 1.93 +diff -u -p -r1.93 exec.c +--- exec/exec.c 2 Apr 2009 23:06:37 -0000 1.93 ++++ exec/exec.c 25 May 2009 09:39:35 -0000 +@@ -1008,10 +1008,13 @@ finish (struct execdata *e, int dealloc_ + #ifdef EXECDATA_STREAM + fclose (&e->stream); + #else +- if (e->file_data != NULL) ++ if (e->file_data != NULL) { + free (e->file_data); +- else if (map_buffer (e) != NULL) ++ e->file_data = NULL; ++ } else if (map_buffer (e) != NULL) { + munmap (map_buffer (e), map_vsize (e)); ++ map_buffer (e) = NULL; ++ } + #endif + } + if (dealloc_file && e->file != MACH_PORT_NULL) |