summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/torque/files/2.3.0-fixes_r2031.patch')
-rw-r--r--sys-cluster/torque/files/2.3.0-fixes_r2031.patch342
1 files changed, 342 insertions, 0 deletions
diff --git a/sys-cluster/torque/files/2.3.0-fixes_r2031.patch b/sys-cluster/torque/files/2.3.0-fixes_r2031.patch
new file mode 100644
index 000000000000..499a5e2e5b37
--- /dev/null
+++ b/sys-cluster/torque/files/2.3.0-fixes_r2031.patch
@@ -0,0 +1,342 @@
+Index: CHANGELOG
+===================================================================
+--- CHANGELOG (revision 2013)
++++ CHANGELOG (revision 2032)
+@@ -1,5 +1,9 @@
+ c - crash b - bug fix e - enhancement f - new feature
+
++2.3.1
++ b - fixed memory leak in free_br for PBS_BATCH_MvJobFile case
++ e - torque can now compile on Linux and OS X with NDEBUG defined
++
+ 2.3.0
+ e - redesign how torque.spec is built
+ e - added -a to qrun to allow asynchronous job start
+Index: src/resmom/start_exec.c
+===================================================================
+--- src/resmom/start_exec.c (revision 2013)
++++ src/resmom/start_exec.c (revision 2032)
+@@ -3313,16 +3313,18 @@
+
+ if (strlen(shell) == 0)
+ {
++#ifndef NDEBUG
+ extern char mom_host[];
+-
++#endif
+ DBPRT(("user \"%s\" may not have a shell defined on node \"%s\"\n",
+ pwdp->pw_name,
+ mom_host));
+ }
+ else if (strstr(shell,"/bin/false") != NULL)
+ {
++#ifndef NDEBUG
+ extern char mom_host[];
+-
++#endif
+ DBPRT(("user \"%s\" has shell \"/bin/false\" on node \"%s\"\n",
+ pwdp->pw_name,
+ mom_host));
+Index: src/resmom/requests.c
+===================================================================
+--- src/resmom/requests.c (revision 2013)
++++ src/resmom/requests.c (revision 2032)
+@@ -1479,8 +1479,9 @@
+ int signum)
+
+ {
++#ifndef NDEBUG
+ char id[] = "sigalltasks_sisters";
+-
++#endif
+ char *cookie;
+ eventent *ep;
+ int i;
+Index: src/resmom/mom_main.c
+===================================================================
+--- src/resmom/mom_main.c (revision 2013)
++++ src/resmom/mom_main.c (revision 2032)
+@@ -4884,8 +4884,9 @@
+ int fd)
+
+ {
++#ifndef NDEBUG
+ static char id[] = "do_tcp";
+-
++#endif
+ int ret, proto, version;
+ int tm_request A_((int stream, int version));
+
+Index: src/resmom/darwin/mom_mach.c
+===================================================================
+--- src/resmom/darwin/mom_mach.c (revision 2013)
++++ src/resmom/darwin/mom_mach.c (revision 2032)
+@@ -400,7 +400,9 @@
+ job *pjob)
+
+ {
++#ifndef NDEBUG
+ static char id[] = "cput_sum";
++#endif
+ int i;
+ u_long cputime;
+ int nps = 0;
+@@ -480,7 +482,9 @@
+ job *pjob) /* I */
+
+ {
++#ifndef NDEBUG
+ char *id = "mem_sum";
++#endif
+ int i;
+ unsigned long memsize = 0;
+
+@@ -527,7 +531,9 @@
+ job *pjob)
+
+ {
++#ifndef NDEBUG
+ char *id = "resi_sum";
++#endif
+ int i;
+ unsigned long memsize = 0;
+
+@@ -658,7 +664,9 @@
+ job *pjob;
+ int set_mode; /* SET_LIMIT_SET or SET_LIMIT_ALTER */
+ {
++#ifndef NDEBUG
+ char *id = "mom_set_limits";
++#endif
+ char *pname;
+ int retval;
+ unsigned long value; /* place in which to build resource value */
+@@ -777,7 +785,9 @@
+
+ job *pjob)
+ {
++#ifndef NDEBUG
+ char *id = "mom_do_poll";
++#endif
+ char *pname;
+ resource *pres;
+
+@@ -820,7 +830,9 @@
+ int mom_open_poll()
+
+ {
++#ifndef NDEBUG
+ char *id = "mom_open_poll";
++#endif
+
+ DBPRT(("%s: entered\n",
+ id))
+@@ -1032,7 +1044,9 @@
+ job *pjob)
+
+ {
++#ifndef NDEBUG
+ char *id = "mom_over_limit";
++#endif
+ char *pname;
+ int retval;
+ unsigned long value, num;
+@@ -1416,7 +1430,9 @@
+ pid_t jobid)
+
+ {
++#ifndef NDEBUG
+ char *id = "cput_job";
++#endif
+ int i;
+ unsigned long cputime;
+ time_value_t total_time;
+@@ -1487,7 +1503,9 @@
+ pid_t pid)
+
+ {
++#ifndef NDEBUG
+ char *id = "cput_proc";
++#endif
+ uint cputime;
+ int i;
+ time_value_t total_time;
+@@ -1597,7 +1615,9 @@
+ pid_t jobid)
+
+ {
++#ifndef NDEBUG
+ char *id = "mem_job";
++#endif
+ int i;
+ int memsize, addmem;
+ int found = 0;
+Index: src/resmom/darwin/mom_start.c
+===================================================================
+--- src/resmom/darwin/mom_start.c (revision 2013)
++++ src/resmom/darwin/mom_start.c (revision 2032)
+@@ -188,7 +188,9 @@
+
+ void scan_for_terminated()
+ {
++#ifndef NDEBUG
+ static char id[] = "scan_for_terminated";
++#endif
+ int exiteval;
+ pid_t pid;
+ job *pjob;
+Index: src/resmom/mom_inter.c
+===================================================================
+--- src/resmom/mom_inter.c (revision 2013)
++++ src/resmom/mom_inter.c (revision 2032)
+@@ -581,8 +581,9 @@
+ #ifdef IPV6_V6ONLY
+ if (ai->ai_family == AF_INET6) {
+ int on = 1;
+- if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) < 0)
++ if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) < 0) {
+ DBPRT(("setsockopt IPV6_V6ONLY: %.100s\n", strerror(errno)));
++ }
+ }
+ #endif
+ if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
+Index: src/server/node_func.c
+===================================================================
+--- src/server/node_func.c (revision 2013)
++++ src/server/node_func.c (revision 2032)
+@@ -1132,7 +1132,9 @@
+ int update_nodes_file()
+
+ {
++#ifndef NDEBUG
+ static char id[] = "update_nodes_file";
++#endif
+ struct pbsnode *np;
+ int i, j;
+ FILE *nin;
+Index: src/server/req_movejob.c
+===================================================================
+--- src/server/req_movejob.c (revision 2013)
++++ src/server/req_movejob.c (revision 2032)
+@@ -121,7 +121,9 @@
+ struct batch_request *req)
+
+ {
++#ifndef NDEBUG
+ char *id = "req_movejob";
++#endif
+ job *jobp;
+
+ jobp = chk_job_request(req->rq_ind.rq_move.rq_jid,req);
+@@ -220,7 +222,9 @@
+ struct batch_request *req) /* I */
+
+ {
++#ifndef NDEBUG
+ char *id = "req_orderjob";
++#endif
+ job *pjob;
+ job *pjob1;
+ job *pjob2;
+Index: src/server/node_manager.c
+===================================================================
+--- src/server/node_manager.c (revision 2013)
++++ src/server/node_manager.c (revision 2032)
+@@ -2130,7 +2130,9 @@
+ */
+ int write_node_note()
+ {
++#ifndef NDEBUG
+ static char id[] = "write_node_note";
++#endif
+ struct pbsnode *np;
+ int i;
+ FILE *nin;
+Index: src/server/process_request.c
+===================================================================
+--- src/server/process_request.c (revision 2013)
++++ src/server/process_request.c (revision 2032)
+@@ -1080,11 +1080,7 @@
+
+ break;
+
+- /* CRI RT #255 reports a memory leak at this point, but I can't
+- * reproduce it, so I'm just leaving this here for now */
+ case PBS_BATCH_MvJobFile:
+- log_err(-1,"free_br","BUG: NOT freeing from PBS_BATCH_MvJobFile");
+- break;
+ case PBS_BATCH_jobscript:
+
+ if (preq->rq_ind.rq_jobfile.rq_data)
+Index: src/lib/Libattr/attr_fn_resc.c
+===================================================================
+--- src/lib/Libattr/attr_fn_resc.c (revision 2013)
++++ src/lib/Libattr/attr_fn_resc.c (revision 2032)
+@@ -81,9 +81,7 @@
+ #include <assert.h>
+ #include <ctype.h>
+ #include <memory.h>
+-#ifndef NDEBUG
+ #include <stdio.h>
+-#endif
+ #include <stdlib.h>
+ #include <string.h>
+ #include "pbs_ifl.h"
+Index: src/lib/Libattr/attr_node_func.c
+===================================================================
+--- src/lib/Libattr/attr_node_func.c (revision 2013)
++++ src/lib/Libattr/attr_node_func.c (revision 2032)
+@@ -82,9 +82,7 @@
+ #include <sys/types.h>
+ #include <ctype.h>
+ #include <memory.h>
+-#ifndef NDEBUG
+ #include <stdio.h>
+-#endif
+ #include <stdlib.h>
+ #include <string.h>
+ #include <assert.h>
+Index: src/lib/Libifl/tcp_dis.c
+===================================================================
+--- src/lib/Libifl/tcp_dis.c (revision 2013)
++++ src/lib/Libifl/tcp_dis.c (revision 2032)
+@@ -587,8 +587,9 @@
+ size_t ct) /* I */
+
+ {
++#ifndef NDEBUG
+ char *id = "tcp_puts";
+-
++#endif
+ struct tcpdisbuf *tp;
+
+ tp = &tcparray[fd]->writebuf;
+Index: src/lib/Libifl/list_link.c
+===================================================================
+--- src/lib/Libifl/list_link.c (revision 2013)
++++ src/lib/Libifl/list_link.c (revision 2032)
+@@ -81,10 +81,8 @@
+
+ #include "portability.h"
+ #include "list_link.h"
+-#ifndef NDEBUG
+ #include <stdio.h>
+ #include <stdlib.h>
+-#endif
+
+
+ /*
+Index: src/lib/Libnet/rm.c
+===================================================================
+--- src/lib/Libnet/rm.c (revision 2013)
++++ src/lib/Libnet/rm.c (revision 2032)
+@@ -998,7 +998,9 @@
+ int activereq(void)
+
+ {
++#ifndef NDEBUG
+ static char id[] = "activereq";
++#endif
+
+ #if RPP
+ struct out *op;