Skip to content

Commit

Permalink
BF: CS-937 do full valgrind test on V90_BRANCH (9.0.2)
Browse files Browse the repository at this point in the history
// fixed memory leaks in sge_qmaster and japi
  • Loading branch information
jgabler-hpc committed Feb 13, 2025
1 parent e8d8002 commit befcf09
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 23 deletions.
2 changes: 2 additions & 0 deletions source/libs/japi/japi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4453,6 +4453,8 @@ static void *japi_implementation_thread(void * a_user_data_pointer)
/* signal all application threads waiting for a job event */
pthread_cond_broadcast (&Master_japi_job_list_finished_cv);

pthread_exit(nullptr);

DRETURN(nullptr);

SetupFailed:
Expand Down
36 changes: 19 additions & 17 deletions source/libs/sgeobj/ocs_Version.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
#define OCS_VERSION_PATCH 0
#define OCS_VERSION_SUFFIX "prealpha"

const std::string ocs::Version::OCS_VERSION_STRING = std::to_string(OCS_VERSION_MAJOR) + "."
+ std::to_string(OCS_VERSION_MINOR) + "." + std::to_string(OCS_VERSION_PATCH) + OCS_VERSION_SUFFIX;
const uint32_t ocs::Version::OCS_VERSION = 0x10009001;
const std::string OCS_VERSION_STRING{std::to_string(OCS_VERSION_MAJOR) + "."
+ std::to_string(OCS_VERSION_MINOR) + "." + std::to_string(OCS_VERSION_PATCH) + OCS_VERSION_SUFFIX};
const uint32_t OCS_VERSION{0x10009001};

const std::vector<std::tuple<uint32_t, std::string>> ocs::Version::OCS_ALL_VERSIONS_VECTOR = {
static const std::vector<std::tuple<uint32_t, std::string>> OCS_ALL_VERSIONS_VECTOR{
{ 0x10000000, "5.0"},
{ 0x10000001, "5.1"},
{ 0x10000002, "5.2"},
Expand Down Expand Up @@ -74,15 +74,15 @@ const std::vector<std::tuple<uint32_t, std::string>> ocs::Version::OCS_ALL_VERSI
{ 0x10003000, "8.0.x Univa"},
{ 0x10003001, "8.0.x Some Gridengine"},
{ 0x10009000, "9.0.x Gridware Cluster Scheduler"},
{ OCS_VERSION, get_version_string().c_str()},
{ OCS_VERSION, OCS_VERSION_STRING},
};

#ifdef ADD_GRIDWARE_COPYRIGHT
const std::string ocs::Version::OCS_LONG_PRODUCT_NAME = "Gridware Cluster Scheduler";
const std::string ocs::Version::OCS_SHORT_PRODUCT_NAME = "GCS";
static const std::string OCS_LONG_PRODUCT_NAME{"Gridware Cluster Scheduler"};
static const std::string OCS_SHORT_PRODUCT_NAME{"GCS"};
#else
const std::string ocs::Version::OCS_LONG_PRODUCT_NAME = "Open Cluster Scheduler";
const std::string ocs::Version::OCS_SHORT_PRODUCT_NAME = "OCS";
static const std::string OCS_LONG_PRODUCT_NAME{"Open Cluster Scheduler"};
static const std::string OCS_SHORT_PRODUCT_NAME{"OCS"};
#endif

std::string
Expand All @@ -95,11 +95,13 @@ ocs::Version::get_version() {
return OCS_VERSION;
}

std::string ocs::Version::get_short_product_name(){
std::string
ocs::Version::get_short_product_name() {
return OCS_SHORT_PRODUCT_NAME;
}

std::string ocs::Version::get_long_product_name(){
std::string
ocs::Version::get_long_product_name() {
return OCS_LONG_PRODUCT_NAME;
}

Expand Down Expand Up @@ -174,21 +176,21 @@ ocs::Version::do_versions_match(lList **alpp, const uint32_t version, const char


#if !(ADD_COPYRIGHT || ADD_HPC_GRIDWARE_COPYRIGHT)
extern const char SFLN_ELN[] = "\n\
extern const char SFLN_ELN[]{"\n\
Cluster Scheduler is based on code donated by Sun Microsystems.\n\
The copyright is owned by Sun Microsystems and other contributors.\n\
It has been made available to the open source community under the SISSL license.\n\
For further information and the latest news visit: @fBhttp://gridengine.sunsource.net\n\n";
For further information and the latest news visit: @fBhttp://gridengine.sunsource.net\n\n"};

extern const char DQS_ACK[] = "\n\
extern const char DQS_ACK[]{"\n\
We would like to acknowledge and thank the efforts of the\n\
Florida State University in creating the DQS program.\n";
Florida State University in creating the DQS program.\n"};

#endif

#ifndef ADD_HPC_GRIDWARE_COPYRIGHT

extern const char SISSL[] = "\n\
extern const char SISSL[]{"\n\
The Contents of this file are made available subject to the terms of\n\
the Sun Industry Standards Source License Version 1.2\n\
\n\
Expand All @@ -213,6 +215,6 @@ The Initial Developer of the Original Code is: Sun Microsystems, Inc.\n\
\n\
Copyright: 2001 by Sun Microsystems, Inc.\n\
\n\
All Rights Reserved.\n";
All Rights Reserved.\n"};

#endif
6 changes: 0 additions & 6 deletions source/libs/sgeobj/ocs_Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@

namespace ocs {
class Version {
static const uint32_t OCS_VERSION;
static const std::string OCS_VERSION_STRING;
static const std::string OCS_LONG_PRODUCT_NAME;
static const std::string OCS_SHORT_PRODUCT_NAME;

static const std::vector<std::tuple<uint32_t, std::string>> OCS_ALL_VERSIONS_VECTOR;
public:
static uint32_t get_version();
static std::string get_version_string();
Expand Down

0 comments on commit befcf09

Please sign in to comment.