Author: astitcher
Date: Wed Apr 23 11:01:49 2008
New Revision: 650970
URL: http://svn.apache.org/viewvc?rev=650970&view=rev
Log:
Patch from Mick Goulish: Fixes to previous improved portability patch
Modified:
incubator/qpid/trunk/qpid/cpp/src/qpid/Options.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Daemon.cpp
incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/Options.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/Options.cpp?rev=650970&r1=650969&r2=650970&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/Options.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/Options.cpp Wed Apr 23 11:01:49 2008
@@ -57,26 +57,26 @@
if (i != opts.options().end())
return (*i)->long_name();
#else
-
/*===================================================================
- For Boost version 103200 and below.
+ /*
+ * For Boost version 103200 and below.
+ *
+ * In Boost version 103200, the options_description::options
member,
+ * used above, is private. So what I will do here is use the
+ * count() funtion, which returns a 1 or 0 indicating presence or
+ * absence of the environment variable.
+ *
+ * If it is present, I will return its name. Env vars do not have
+ * short and long forms, so the name is synonymous with the long
+ * name. (This would not work for command line args.)
+ * And if it's absent -- an empty string.
+ */
- In Boost version 103200, the options_description::options member,
- used above, is private. So what I will do here is use the
- count() funtion, which returns a 1 or 0 indicating presence or
- absence of the environment variable.
-
- If it is present, I will return its name. Env vars do not have
- short and long forms, so the name is synonymous with the long
- name. (This would not work for command line args.)
- And if it's absent -- an empty string.
-
=====================================================================*/
-
- /*------------------------------------------------------------
- The env vars come in unaltered, i.e. QPID_FOO, but the
- options are stored normalized as "qpid-foo". Change the
- local variable "env" so it can be found by "opts".
- ------------------------------------------------------------*/
+ /*
+ * The env vars come in unaltered, i.e. QPID_FOO, but the
+ * options are stored normalized as "qpid-foo". Change the
+ * local variable "env" so it can be found by "opts".
+ */
for (std::string::iterator i = env.begin(); i != env.end(); ++i)
{
*i = (*i == '_')
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Daemon.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Daemon.cpp?rev=650970&r1=650969&r2=650970&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Daemon.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Daemon.cpp Wed Apr 23
11:01:49 2008
@@ -41,10 +41,10 @@
}
-/*--------------------------------------------------
- Rewritten using low-level IO, for compatibility
- with earlier Boost versions, i.e. 103200.
---------------------------------------------------*/
+/*
+ * Rewritten using low-level IO, for compatibility
+ * with earlier Boost versions, i.e. 103200.
+ */
struct LockFile {
LockFile(const std::string& path_, bool create)
@@ -86,10 +86,10 @@
return path.str();
}
-/*--------------------------------------------------
- Rewritten using low-level IO, for compatibility
- with earlier Boost versions, i.e. 103200.
---------------------------------------------------*/
+/*
+ * Rewritten using low-level IO, for compatibility
+ * with earlier Boost versions, i.e. 103200.
+ */
void Daemon::fork()
{
throwIf(::pipe(pipeFds) < 0, "Can't create pipe");
@@ -143,10 +143,10 @@
tv.tv_sec = timeout;
tv.tv_usec = 0;
- /*--------------------------------------------------
- Rewritten using low-level IO, for compatibility
- with earlier Boost versions, i.e. 103200.
- --------------------------------------------------*/
+ /*
+ * Rewritten using low-level IO, for compatibility
+ * with earlier Boost versions, i.e. 103200.
+ */
fd_set fds;
FD_ZERO(&fds);
FD_SET(pipeFds[0], &fds);
@@ -198,10 +198,10 @@
lockFile = pidFile(port);
LockFile lf(lockFile, true);
- /*---------------------------------------------------
- Rewritten using low-level IO, for compatibility
- with earlier Boost versions, i.e. 103200.
- ---------------------------------------------------*/
+ /*
+ * Rewritten using low-level IO, for compatibility
+ * with earlier Boost versions, i.e. 103200.
+ */
/*
* Write the PID to the lockfile.
*/
@@ -230,10 +230,11 @@
string name = pidFile(port);
LockFile lf(name, false);
pid_t pid;
- /*---------------------------------------------------
- Rewritten using low-level IO, for compatibility
- with earlier Boost versions, i.e. 103200.
- ---------------------------------------------------*/
+
+ /*
+ * Rewritten using low-level IO, for compatibility
+ * with earlier Boost versions, i.e. 103200.
+ */
int desired_read = sizeof(pid_t);
if ( desired_read > ::read(lf.fd, & pid, desired_read) ) {
throw Exception("Cannot read lock file " + name);
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp?rev=650970&r1=650969&r2=650970&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp Wed Apr 23 11:01:49
2008
@@ -30,3 +30,77 @@
fun:epoll_ctl
}
+{
+ RHEL4 -- we think Boost is responsible for these leaks.
+ Memcheck:Leak
+ fun:_Znwm
+ fun:_ZN5boost15program_options??options_description*
+}
+
+{
+ RHEL4 -- we think Boost is responsible for these leaks.
+ Memcheck:Leak
+ fun:_Znwm
+ fun:_ZN5boost9unit_test9test_case*
+}
+
+{
+ RHEL4 -- we think Boost is responsible for these leaks.
+ Memcheck:Leak
+ fun:calloc
+ fun:_dlerror_run
+ fun:dlopen@@GLIBC_2.2.5
+ fun:_ZN4qpid3sys5Shlib4loadEPKc
+ fun:_Z9testShlibv
+ fun:_ZN5boost9unit_test9ut_detail17unit_test_monitor8functionEv
+ obj:/usr/lib64/libboost_unit_test_framework.so.1.32.0
+ fun:_ZN5boost17execution_monitor7executeEbi
+
fun:_ZN5boost9unit_test9ut_detail17unit_test_monitor21execute_and_translateEPNS0_9test_caseEMS3_FvvEi
+ fun:_ZN5boost9unit_test9test_case3runEv
+ fun:_ZN5boost9unit_test10test_suite6do_runEv
+ fun:_ZN5boost9unit_test9test_case3runEv
+ fun:main
+}
+
+{
+ RHEL4 -- we think Boost is responsible for these leaks.
+ Memcheck:Leak
+ fun:calloc
+ fun:_dl_allocate_tls
+ fun:pthread_create@@GLIBC_2.2.5
+ fun:_ZN4qpid6broker5Timer5startEv
+ fun:_ZN4qpid6broker5TimerC1Ev
+ fun:_ZN4qpid6broker10DtxManagerC1Ev
+ fun:_ZN4qpid6broker6BrokerC1ERKNS1_7OptionsE
+ fun:_ZN4qpid6broker6Broker6createERKNS1_7OptionsE
+ fun:_ZN15SessionFixtureTI15ProxyConnectionEC2Ev
+ fun:_Z14testQueueQueryv
+ fun:_ZN5boost9unit_test9ut_detail17unit_test_monitor8functionEv
+ obj:/usr/lib64/libboost_unit_test_framework.so.1.32.0
+ fun:_ZN5boost17execution_monitor7executeEbi
+
fun:_ZN5boost9unit_test9ut_detail17unit_test_monitor21execute_and_translateEPNS0_9test_caseEMS3_FvvEi
+ fun:_ZN5boost9unit_test9test_case3runEv
+ fun:_ZN5boost9unit_test10test_suite6do_runEv
+ fun:_ZN5boost9unit_test9test_case3runEv
+ fun:main
+}
+
+{
+ INVESTIGATE
+ Memcheck:Leak
+ fun:calloc
+ fun:_dl_allocate_tls
+ fun:pthread_create@@GLIBC_2.2.5
+ fun:_ZN4qpid6client9Connector4initEv
+ fun:_ZN4qpid6client14ConnectionImpl4openERKSsiS3_S3_S3_
+}
+
+{
+ INVESTIGATE
+ Memcheck:Param
+ write(buf)
+ obj:/lib64/tls/libc-2.3.4.so
+ fun:_ZNK4qpid3sys6Socket5writeEPKvm
+ fun:_ZN4qpid3sys8AsynchIO9writeableERNS0_14DispatchHandleE
+}
+