From db939c837ca412996ca9f79337831626c91f93d0 Mon Sep 17 00:00:00 2001 From: bas Date: Thu, 4 Oct 2012 08:36:35 +0000 Subject: [PATCH] Showstats segfaults when using compiler optimization git-svn-id: svn://opensvn.adaptivecomputing.com/maui/trunk@153 3f5042e3-fb1d-0410-be18-d6ca2573e517 --- CHANGELOG | 1 + src/moab/MSched.c | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 69f0202..7bcab30 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Maui 3.3.2 - Patch for 'diagnose -f'. Allow to specify what section of fairshare you want to see, default is everything (-f [user|group|acct|class|qos]). To show fairshare for a group, use: * diagnose -f group (Author: Dennis Stam and applied by Bas van der Vlies) + - Showstats segfaults when using compiler optimization (Author: Andrew Savchenko, applied by Bas van der Vlies) Maui 3.3.1 - Fixed issue where hostlist was being overwritten resulting in broken $PBS_NODEFILE. (Alexis Cousein) diff --git a/src/moab/MSched.c b/src/moab/MSched.c index 424131a..01cfad6 100644 --- a/src/moab/MSched.c +++ b/src/moab/MSched.c @@ -3981,9 +3981,6 @@ int MSchedStatToString( /* build stat buffer */ - sprintf(Buf,"%ld\n", - S->Time); - /* set up scheduler run time */ RunTime = MStat.SchedRunTime; @@ -3991,10 +3988,10 @@ int MSchedStatToString( GP = &MPar[0]; T = &GP->S; - /* STM ITM RTM IJ EJ AJ UN UP UM IN IP IM CT SJ TPA TPB SPH TMA TMD QP AQP NJA JAC PSX IT RPI WEF WI MXF ABP MBP AQT MQT PSR PSD PSU MSA MSD JE */ + /* CTM STM ITM RTM IJ EJ AJ UN UP UM IN IP IM CT SJ TPA TPB SPH TMA TMD QP AQP NJA JAC PSX IT RPI WEF WI MXF ABP MBP AQT MQT PSR PSD PSU MSA MSD JE */ - sprintf(Buf,"%s%ld %ld %ld %d %d %d %d %d %d %d %d %d %d %d %lf %lf %lf %lf %lf %d %lu %lf %lf %lf %d %ld %lf %d %lf %lf %d %lf %lu %lf %lf %lf %lf %lf %d %d %lf\n", - Buf, + sprintf(Buf,"%ld\n%ld %ld %ld %d %d %d %d %d %d %d %d %d %d %d %lf %lf %lf %lf %lf %d %lu %lf %lf %lf %d %ld %lf %d %lf %lf %d %lf %lu %lf %lf %lf %lf %lf %d %d %lf\n", + S->Time, S->StartTime, MStat.InitTime, RunTime,