The memory stomp bug I submitted to bug-make@gnu.org : http://lists.gnu.org/archive/html/bug-make/2014-01/msg00077.html The sourceforge one is from : http://lists.gnu.org/archive/html/bug-make/2014-01/msg00076.html
39 lines
899 B
Diff
39 lines
899 B
Diff
diff -urN make.orig/job.c make/job.c
|
|
--- make.orig/job.c 2014-01-25 16:59:36.959167700 +0000
|
|
+++ make/job.c 2014-01-25 17:04:14.132864300 +0000
|
|
@@ -1111,6 +1111,7 @@
|
|
sigaction (SIGCLD, &sa, NULL);
|
|
#endif
|
|
#if defined SIGALRM
|
|
+#if 0
|
|
if (set_alarm)
|
|
{
|
|
/* If we're about to enter the read(), set an alarm to wake up in a
|
|
@@ -1121,6 +1122,26 @@
|
|
sa.sa_flags = 0;
|
|
sigaction (SIGALRM, &sa, NULL);
|
|
}
|
|
+#else /* 0 */
|
|
+ /* From http://savannah.gnu.org/bugs/?41341 */
|
|
+ if (set_alarm)
|
|
+ {
|
|
+ if(set_handler)
|
|
+ {
|
|
+ sa.sa_handler = job_noop;
|
|
+ sa.sa_flags = 0;
|
|
+ sigaction (SIGALRM, &sa, NULL);
|
|
+ alarm (1);
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ alarm (0);
|
|
+ sa.sa_handler = SIG_DFL;
|
|
+ sa.sa_flags = 0;
|
|
+ sigaction (SIGALRM, &sa, NULL);
|
|
+ }
|
|
+ }
|
|
+#endif /* 0 */
|
|
#endif
|
|
}
|
|
#endif
|