Signed-off-by: Peter Foley <pefol...@pefoley.com> --- CMakeLists.txt | 2 ++ src/ResumeLog.C | 2 +- src/dyninst/amd64_7_arg_call.C | 2 +- src/dyninst/dyninst_comp.C | 16 ++++++++-------- src/dyninst/libTest12.c | 14 ++++++++------ src/dyninst/test1_10.C | 6 +++--- src/dyninst/test1_11.C | 8 ++++---- src/dyninst/test1_12.C | 2 +- src/dyninst/test1_13.C | 4 ++-- src/dyninst/test1_17.C | 4 ++-- src/dyninst/test1_19.C | 4 ++-- src/dyninst/test1_2.C | 2 +- src/dyninst/test1_22.C | 8 ++++---- src/dyninst/test1_22_mutatee.c | 4 ++-- src/dyninst/test1_24.C | 2 +- src/dyninst/test1_28.C | 2 +- src/dyninst/test1_3.C | 2 +- src/dyninst/test1_30.C | 2 +- src/dyninst/test1_33.C | 4 ++-- src/dyninst/test1_34.C | 2 +- src/dyninst/test1_37.C | 8 ++++---- src/dyninst/test1_9.C | 2 +- src/dyninst/test4_3_mutatee.c | 2 +- src/dyninst/test4_4_mutatee.c | 2 +- src/dyninst/test_callback_2.C | 2 +- src/dyninst/test_thread_1_mutatee.c | 2 +- src/dynlmon.C | 2 +- src/libtestA.c | 2 +- src/mutatee_call_info.h | 4 ++-- src/mutatee_util.c | 28 ++++++++++++++-------------- src/mutatee_util.h | 6 +++--- src/proccontrol/pc_breakpoint_mutatee.c | 8 ++++---- src/proccontrol/pc_fork_exec_mutatee.c | 4 ++-- src/proccontrol/pc_fork_mutatee.c | 2 +- src/proccontrol/pc_groups_mutatee.c | 2 +- src/proccontrol/pc_hw_breakpoint_mutatee.c | 16 ++++++++-------- src/proccontrol/pc_irpc_mutatee.c | 6 +++--- src/proccontrol/pc_singlestep_mutatee.c | 4 ++-- src/proccontrol/pc_tls_mutatee.c | 4 +++- src/proccontrol/pcontrol_mutatee_tools.c | 10 +++++----- src/proccontrol/pcontrol_mutatee_tools.h | 2 +- src/proccontrol/proccontrol_comp.C | 2 +- src/remotetest.C | 2 +- src/runTests-utils.C | 2 +- src/runTests.C | 6 +++--- src/symtab/test_anno_basic_types.C | 4 ++-- src/symtab/test_relocations.C | 2 +- 47 files changed, 117 insertions(+), 111 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt index 32d696b..3457f36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,6 +62,8 @@ include_directories(${LAUNCHMON_INCLUDE_DIR}) add_definitions(${LAUNCHMON_DEFINITIONS}) endif() +add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) + set (INSTALL_DIR "bin/testsuite" CACHE PATH "Testsuite installation directory") # Build rules for the test libraries (libtestdyninst, libtestproccontrol, etc.) diff --git a/src/ResumeLog.C b/src/ResumeLog.C index 40a7607..0acdb7b 100644 --- a/src/ResumeLog.C +++ b/src/ResumeLog.C @@ -300,7 +300,7 @@ void clear_mutateelog(char *logname) fclose(f); } -static char *resumelog_name = "resumelog"; +static char *resumelog_name = const_cast<char*>("resumelog"); char *get_resumelog_name() { return resumelog_name; } diff --git a/src/dyninst/amd64_7_arg_call.C b/src/dyninst/amd64_7_arg_call.C index 00e3d01..8fd6fb3 100644 --- a/src/dyninst/amd64_7_arg_call.C +++ b/src/dyninst/amd64_7_arg_call.C @@ -92,7 +92,7 @@ test_results_t DLLEXPORT amd64_7_arg_call_Mutator::executeTest() } BPatch_Vector<BPatch_function *> bpfv; - char *fn = "amd64_7_arg_call"; + const char *fn = "amd64_7_arg_call"; if (NULL == appImage->findFunction(fn, bpfv) || !bpfv.size() diff --git a/src/dyninst/dyninst_comp.C b/src/dyninst/dyninst_comp.C index f87337c..0cc9e18 100644 --- a/src/dyninst/dyninst_comp.C +++ b/src/dyninst/dyninst_comp.C @@ -1080,7 +1080,7 @@ void dumpvect(BPatch_Vector<BPatch_point*>* res, const char* msg) if(!debugPrint()) return; - printf("%s: %d\n", msg, res->size()); + printf("%s: %ld\n", msg, res->size()); for(unsigned int i=0; i<res->size(); ++i) { BPatch_point *bpp = (*res)[i]; const BPatch_memoryAccess* ma = bpp->getMemoryAccess(); @@ -1088,19 +1088,19 @@ void dumpvect(BPatch_Vector<BPatch_point*>* res, const char* msg) const BPatch_countSpec_NP& cs = ma->getByteCount_NP(); if(ma->getNumberOfAccesses() == 1) { if(ma->isConditional_NP()) - printf("%s[%d]: @[r%d+r%d<<%d+%d] #[r%d+r%d+%d] ?[%X]\n", msg, i+1, + printf("%s[%d]: @[r%d+r%d<<%d+%ld] #[r%d+r%d+%ld] ?[%X]\n", msg, i+1, as.getReg(0), as.getReg(1), as.getScale(), as.getImm(), cs.getReg(0), cs.getReg(1), cs.getImm(), ma->conditionCode_NP()); else - printf("%s[%d]: @[r%d+r%d<<%d+%d] #[r%d+r%d+%d]\n", msg, i+1, + printf("%s[%d]: @[r%d+r%d<<%d+%ld] #[r%d+r%d+%ld]\n", msg, i+1, as.getReg(0), as.getReg(1), as.getScale(), as.getImm(), cs.getReg(0), cs.getReg(1), cs.getImm()); } else { const BPatch_addrSpec_NP& as2 = ma->getStartAddr_NP(1); const BPatch_countSpec_NP& cs2 = ma->getByteCount_NP(1); - printf("%s[%d]: @[r%d+r%d<<%d+%d] #[r%d+r%d+%d] && " - "@[r%d+r%d<<%d+%d] #[r%d+r%d+%d]\n", msg, i+1, + printf("%s[%d]: @[r%d+r%d<<%d+%ld] #[r%d+r%d+%ld] && " + "@[r%d+r%d<<%d+%ld] #[r%d+r%d+%ld]\n", msg, i+1, as.getReg(0), as.getReg(1), as.getScale(), as.getImm(), cs.getReg(0), cs.getReg(1), cs.getImm(), as2.getReg(0), as2.getReg(1), as2.getScale(), as2.getImm(), @@ -1123,14 +1123,14 @@ static inline void dumpxpct(const BPatch_memoryAccess* exp[], unsigned int size, const BPatch_addrSpec_NP& as = ma->getStartAddr_NP(); const BPatch_countSpec_NP& cs = ma->getByteCount_NP(); if(ma->getNumberOfAccesses() == 1) - printf("%s[%d]: @[r%d+r%d<<%d+%d] #[r%d+r%d+%d]\n", msg, i+1, + printf("%s[%d]: @[r%d+r%d<<%d+%ld] #[r%d+r%d+%ld]\n", msg, i+1, as.getReg(0), as.getReg(1), as.getScale(), as.getImm(), cs.getReg(0), cs.getReg(1), cs.getImm()); else { const BPatch_addrSpec_NP& as2 = ma->getStartAddr_NP(1); const BPatch_countSpec_NP& cs2 = ma->getByteCount_NP(1); - printf("%s[%d]: @[r%d+r%d<<%d+%d] #[r%d+r%d+%d] && " - "@[r%d+r%d<<%d+%d] #[r%d+r%d+%d]\n", msg, i+1, + printf("%s[%d]: @[r%d+r%d<<%d+%ld] #[r%d+r%d+%ld] && " + "@[r%d+r%d<<%d+%ld] #[r%d+r%d+%ld]\n", msg, i+1, as.getReg(0), as.getReg(1), as.getScale(), as.getImm(), cs.getReg(0), cs.getReg(1), cs.getImm(), as2.getReg(0), as2.getReg(1), as2.getScale(), as2.getImm(), diff --git a/src/dyninst/libTest12.c b/src/dyninst/libTest12.c index 4c4e093..c2b9b4a 100644 --- a/src/dyninst/libTest12.c +++ b/src/dyninst/libTest12.c @@ -29,9 +29,11 @@ */ /* $Id: libTest12.c,v 1.1 2008/10/30 19:17:17 legendre Exp $ */ +#include <inttypes.h> #include <stdio.h> #include <stdlib.h> #include <pthread.h> +#include <unistd.h> /*#include <dyninstRTExport.h>*/ #include "test12.h" @@ -55,7 +57,7 @@ void reportEntry() msg.id = nextid++; msg.what = func_entry; msg.tid = /*(unsigned long) pthread_self(); */ getpid(); - ldprintf(stderr, "%s[%d]: reporting function entry, thread %lu\n", __FILE__, __LINE__, msg.tid); + ldprintf(stderr, "%s[%d]: reporting function entry, thread "PRIuPTR"\n", __FILE__, __LINE__, msg.tid); if (did_report_entry) { fprintf(stderr, "%s[%d]: WARNING: calling reportEntry AGAIN\n", __FILE__, __LINE__); @@ -72,7 +74,7 @@ void reportExit() msg.id = nextid++; msg.what = func_exit; msg.tid = /*(unsigned long) pthread_self(); */ getpid(); - ldprintf(stderr, "%s[%d]: reporting function exit, thread %lu\n", __FILE__, __LINE__, msg.tid); + ldprintf(stderr, "%s[%d]: reporting function exit, thread "PRIuPTR"\n", __FILE__, __LINE__, msg.tid); if (did_report_exit) { fprintf(stderr, "%s[%d]: WARNING: calling reportEntry AGAIN\n", __FILE__, __LINE__); @@ -89,7 +91,7 @@ void reportCallsite() msg.id = nextid++; msg.what = func_callsite; msg.tid = /*(unsigned long) pthread_self(); */ getpid(); - ldprintf(stderr, "%s[%d]: reporting function callsite, thread %lu\n", __FILE__, __LINE__, msg.tid); + ldprintf(stderr, "%s[%d]: reporting function callsite, thread "PRIuPTR"\n", __FILE__, __LINE__, msg.tid); if (0 != DYNINSTuserMessage(&msg, sizeof(user_msg_t))) { fprintf(stderr, "%s[%d]: DYNINSTuserMessage failed\n", __FILE__, __LINE__); } @@ -101,7 +103,7 @@ void reportEvent1() msg.id = nextid++; msg.what = test3_event1; msg.tid = (unsigned long) pthread_self(); - ldprintf(stderr, "%s[%d]: reporting event 1, thread %lu\n", __FILE__, __LINE__, msg.tid); + ldprintf(stderr, "%s[%d]: reporting event 1, thread "PRIuPTR"\n", __FILE__, __LINE__, msg.tid); if (0 != DYNINSTuserMessage(&msg, sizeof(user_msg_t))) { fprintf(stderr, "%s[%d]: DYNINSTuserMessage failed\n", __FILE__, __LINE__); } @@ -113,7 +115,7 @@ void reportEvent2() msg.id = nextid++; msg.what = test3_event2; msg.tid = (unsigned long) pthread_self(); - ldprintf(stderr, "%s[%d]: reporting event 2, thread %lu\n", __FILE__, __LINE__, msg.tid); + ldprintf(stderr, "%s[%d]: reporting event 2, thread "PRIuPTR"\n", __FILE__, __LINE__, msg.tid); if (0 != DYNINSTuserMessage(&msg, sizeof(user_msg_t))) { fprintf(stderr, "%s[%d]: DYNINSTuserMessage failed\n", __FILE__, __LINE__); } @@ -125,7 +127,7 @@ void reportEvent3() msg.id = nextid++; msg.what = test3_event3; msg.tid = (unsigned long) pthread_self(); - ldprintf(stderr, "%s[%d]: reporting event 3, thread %lu\n", __FILE__, __LINE__, msg.tid); + ldprintf(stderr, "%s[%d]: reporting event 3, thread "PRIuPTR"\n", __FILE__, __LINE__, msg.tid); if (0 != DYNINSTuserMessage(&msg, sizeof(user_msg_t))) { fprintf(stderr, "%s[%d]: DYNINSTuserMessage failed\n", __FILE__, __LINE__); } diff --git a/src/dyninst/test1_10.C b/src/dyninst/test1_10.C index 8f618e9..edcb61c 100644 --- a/src/dyninst/test1_10.C +++ b/src/dyninst/test1_10.C @@ -88,7 +88,7 @@ test_results_t test1_10_Mutator::executeTest() BPatch_Vector<BPatch_function *> bpfv; - char *fn = "test1_10_call1"; + const char *fn = "test1_10_call1"; if (NULL == appImage->findFunction(fn, bpfv) || !bpfv.size() || NULL == bpfv[0]) @@ -100,7 +100,7 @@ test_results_t test1_10_Mutator::executeTest() BPatch_function *call10_1_func = bpfv[0]; bpfv.clear(); - char *fn2 = "test1_10_call2"; + const char *fn2 = "test1_10_call2"; if (NULL == appImage->findFunction(fn2, bpfv) || !bpfv.size() || NULL == bpfv[0]) @@ -112,7 +112,7 @@ test_results_t test1_10_Mutator::executeTest() BPatch_function *call10_2_func = bpfv[0]; bpfv.clear(); - char *fn3 = "test1_10_call3"; + const char *fn3 = "test1_10_call3"; if (NULL == appImage->findFunction(fn3, bpfv) || !bpfv.size() || NULL == bpfv[0]) diff --git a/src/dyninst/test1_11.C b/src/dyninst/test1_11.C index 0860b40..2a8ad69 100644 --- a/src/dyninst/test1_11.C +++ b/src/dyninst/test1_11.C @@ -107,7 +107,7 @@ test_results_t test1_11_Mutator::executeTest() } BPatch_Vector<BPatch_function *> bpfv; - char *fn = "test1_11_call1"; + const char *fn = "test1_11_call1"; if (NULL == appImage->findFunction(fn, bpfv) || !bpfv.size() || NULL == bpfv[0]) @@ -120,7 +120,7 @@ test_results_t test1_11_Mutator::executeTest() BPatch_function *call11_1_func = bpfv[0]; bpfv.clear(); - char *fn2 = "test1_11_call2"; + const char *fn2 = "test1_11_call2"; if (NULL == appImage->findFunction(fn2, bpfv) || !bpfv.size() || NULL == bpfv[0]) @@ -133,7 +133,7 @@ test_results_t test1_11_Mutator::executeTest() BPatch_function *call11_2_func = bpfv[0]; bpfv.clear(); - char *fn3 = "test1_11_call3"; + const char *fn3 = "test1_11_call3"; if (NULL == appImage->findFunction(fn3, bpfv) || !bpfv.size() || NULL == bpfv[0]) @@ -146,7 +146,7 @@ test_results_t test1_11_Mutator::executeTest() BPatch_function *call11_3_func = bpfv[0]; bpfv.clear(); - char *fn4 = "test1_11_call4"; + const char *fn4 = "test1_11_call4"; if (NULL == appImage->findFunction(fn4, bpfv) || !bpfv.size() || NULL == bpfv[0]) diff --git a/src/dyninst/test1_12.C b/src/dyninst/test1_12.C index f933d5a..dbbeb7e 100644 --- a/src/dyninst/test1_12.C +++ b/src/dyninst/test1_12.C @@ -142,7 +142,7 @@ int test1_12_Mutator::mutatorTesta() } BPatch_Vector<BPatch_function *> bpfv; - char *fn = "test1_12_call1"; + const char *fn = "test1_12_call1"; if (NULL == appImage->findFunction(fn, bpfv) || !bpfv.size() || NULL == bpfv[0]) diff --git a/src/dyninst/test1_13.C b/src/dyninst/test1_13.C index 7f7d412..7810dbd 100644 --- a/src/dyninst/test1_13.C +++ b/src/dyninst/test1_13.C @@ -85,7 +85,7 @@ test_results_t test1_13_Mutator::executeTest() } BPatch_Vector<BPatch_function *> bpfv; - char *fn = "test1_13_call1"; + const char *fn = "test1_13_call1"; if (NULL == appImage->findFunction(fn, bpfv) || !bpfv.size() || NULL == bpfv[0]) @@ -138,7 +138,7 @@ test_results_t test1_13_Mutator::executeTest() bpfv.clear(); - char *fn2 = "test1_13_call2"; + const char *fn2 = "test1_13_call2"; if (NULL == appImage->findFunction(fn2, bpfv) || !bpfv.size() || NULL == bpfv[0]) diff --git a/src/dyninst/test1_17.C b/src/dyninst/test1_17.C index 6da4bcb..07c031e 100644 --- a/src/dyninst/test1_17.C +++ b/src/dyninst/test1_17.C @@ -93,7 +93,7 @@ test_results_t test1_17_Mutator::executeTest() } BPatch_Vector<BPatch_function *> bpfv; - char *fn = "test1_17_call1"; + const char *fn = "test1_17_call1"; if (NULL == appImage->findFunction(fn, bpfv) || !bpfv.size() || NULL == bpfv[0]) @@ -154,7 +154,7 @@ test_results_t test1_17_Mutator::executeTest() } bpfv.clear(); - char *fn2 = "test1_17_call2"; + const char *fn2 = "test1_17_call2"; if (NULL == appImage->findFunction(fn2, bpfv) || !bpfv.size() || NULL == bpfv[0]) diff --git a/src/dyninst/test1_19.C b/src/dyninst/test1_19.C index cb6e7df..956aef3 100644 --- a/src/dyninst/test1_19.C +++ b/src/dyninst/test1_19.C @@ -85,7 +85,7 @@ test_results_t test1_19_Mutator::executeTest() } BPatch_Vector<BPatch_function *> bpfv; - char *fn = "test1_19_call1"; + const char *fn = "test1_19_call1"; if (NULL == appImage->findFunction(fn, bpfv) || !bpfv.size() || NULL == bpfv[0]) @@ -113,7 +113,7 @@ test_results_t test1_19_Mutator::executeTest() } bpfv.clear(); - char *fn2 = "test1_19_call2"; + const char *fn2 = "test1_19_call2"; if (NULL == appImage->findFunction(fn2, bpfv) || !bpfv.size() || NULL == bpfv[0]) diff --git a/src/dyninst/test1_2.C b/src/dyninst/test1_2.C index eb40c02..83b95f5 100644 --- a/src/dyninst/test1_2.C +++ b/src/dyninst/test1_2.C @@ -94,7 +94,7 @@ test_results_t DLLEXPORT test1_2_Mutator::executeTest() } BPatch_Vector<BPatch_function *> bpfv; - char *fn = "test1_2_call2_1"; + const char *fn = "test1_2_call2_1"; if (NULL == appImage->findFunction(fn, bpfv) || !bpfv.size() diff --git a/src/dyninst/test1_22.C b/src/dyninst/test1_22.C index 99e241e..4d924bd 100644 --- a/src/dyninst/test1_22.C +++ b/src/dyninst/test1_22.C @@ -145,8 +145,8 @@ test_results_t test1_22_Mutator::mutatorTest22() // Replace an a.out with another a.out function BPatch_Vector<BPatch_function *> bpfv; - char *fn = "test1_22_call1"; - char *fn2 = "test1_22_call2"; + const char *fn = "test1_22_call1"; + const char *fn2 = "test1_22_call2"; if (NULL == appImage->findFunction(fn, bpfv) || !bpfv.size() || NULL == bpfv[0]) @@ -179,7 +179,7 @@ test_results_t test1_22_Mutator::mutatorTest22() // Replace an a.out function with a shlib function bpfv.clear(); - char *fn3 = "test1_22_call3"; + const char *fn3 = "test1_22_call3"; if (NULL == appImage->findFunction(fn3, bpfv) || !bpfv.size() || NULL == bpfv[0]){ logerror("**Failed test #22 (replace function)\n"); @@ -247,7 +247,7 @@ test_results_t test1_22_Mutator::mutatorTest22() BPatch_function *call22_6func = bpmv[0]; bpfv.clear(); - char *fn4 = "test1_22_call7"; + const char *fn4 = "test1_22_call7"; if (NULL == appImage->findFunction(fn4, bpfv) || !bpfv.size() || NULL == bpfv[0]) diff --git a/src/dyninst/test1_22_mutatee.c b/src/dyninst/test1_22_mutatee.c index de1768f..69ed700 100644 --- a/src/dyninst/test1_22_mutatee.c +++ b/src/dyninst/test1_22_mutatee.c @@ -115,7 +115,7 @@ void *loadDynamicLibrary(char *name) { return result; } -void *getFuncFromDLL(void *libhandle, char *func_name) { +void *getFuncFromDLL(void *libhandle, const char *func_name) { void *result; if (!libhandle || !func_name) { output->log(STDERR, "[%s:%u] - Test error - getFuncFromDLL passed NULL " @@ -140,7 +140,7 @@ void *loadDynamicLibrary(char *name) { return result; } -void *getFuncFromDLL(void *libhandle, char *func_name) { +void *getFuncFromDLL(void *libhandle, const char *func_name) { void *result = dlsym(libhandle, func_name); if (!result) { perror("The mutatee couldn't find a function"); diff --git a/src/dyninst/test1_24.C b/src/dyninst/test1_24.C index 22dc530..772f267 100644 --- a/src/dyninst/test1_24.C +++ b/src/dyninst/test1_24.C @@ -78,7 +78,7 @@ test_results_t test1_24_Mutator::executeTest() // First verify that we can find function call24_1 BPatch_Vector<BPatch_function *> bpfv; - char *fn = "test1_24_call1"; + const char *fn = "test1_24_call1"; if (NULL == appImage->findFunction(fn, bpfv) || !bpfv.size() || NULL == bpfv[0]) diff --git a/src/dyninst/test1_28.C b/src/dyninst/test1_28.C index 76b47d8..73b58b1 100644 --- a/src/dyninst/test1_28.C +++ b/src/dyninst/test1_28.C @@ -125,7 +125,7 @@ test_results_t test1_28_Mutator::executeTest() globalVariable28_8->setType(union28_1); // Next verify that we can find a local variable in call28 - char *fname = "test1_28_call1"; + const char *fname = "test1_28_call1"; BPatch_Vector<BPatch_function *> found_funcs; if ((NULL == appImage->findFunction(fname, found_funcs)) || !found_funcs.size()) diff --git a/src/dyninst/test1_3.C b/src/dyninst/test1_3.C index 03db488..aa3340c 100644 --- a/src/dyninst/test1_3.C +++ b/src/dyninst/test1_3.C @@ -95,7 +95,7 @@ test_results_t test1_3_Mutator::executeTest() } BPatch_Vector<BPatch_function *> bpfv; - char *fn = "test1_3_call3_1"; + const char *fn = "test1_3_call3_1"; if (NULL == appImage->findFunction(fn, bpfv) || !bpfv.size() || NULL == bpfv[0]) diff --git a/src/dyninst/test1_30.C b/src/dyninst/test1_30.C index 2d6b91a..eefbcb3 100644 --- a/src/dyninst/test1_30.C +++ b/src/dyninst/test1_30.C @@ -102,7 +102,7 @@ test_results_t test1_30_Mutator::executeTest() { } BPatch_Vector<BPatch_function *> bpfv; - char *fn = "test1_30_call1"; + const char *fn = "test1_30_call1"; if (NULL == appImage->findFunction(fn, bpfv) || !bpfv.size() || NULL == bpfv[0]){ logerror(" Unable to find function %s\n", fn); diff --git a/src/dyninst/test1_33.C b/src/dyninst/test1_33.C index c3ac485..a51f210 100644 --- a/src/dyninst/test1_33.C +++ b/src/dyninst/test1_33.C @@ -97,7 +97,7 @@ test_results_t test1_33_Mutator::executeTest() } BPatch_Vector<BPatch_function *> bpfv; - char *fn = "test1_33_func2"; + const char *fn = "test1_33_func2"; if (NULL == appImage->findFunction(fn, bpfv) || !bpfv.size() || NULL == bpfv[0]) { @@ -330,7 +330,7 @@ test_results_t test1_33_Mutator::executeTest() * Now check a function with a switch statement. */ bpfv.clear(); - char *fn2 = "test1_33_func3"; + const char *fn2 = "test1_33_func3"; // Bernat, 8JUN05 -- include uninstrumentable here... diff --git a/src/dyninst/test1_34.C b/src/dyninst/test1_34.C index 3145405..8bf50d4 100644 --- a/src/dyninst/test1_34.C +++ b/src/dyninst/test1_34.C @@ -74,7 +74,7 @@ test_results_t test1_34_Mutator::executeTest() unsigned int i; BPatch_Vector<BPatch_function *> bpfv; - char *fn = "test1_34_func2"; + const char *fn = "test1_34_func2"; if (NULL == appImage->findFunction(fn, bpfv) || !bpfv.size() || NULL == bpfv[0]) diff --git a/src/dyninst/test1_37.C b/src/dyninst/test1_37.C index 8aa06e9..4a6b05d 100644 --- a/src/dyninst/test1_37.C +++ b/src/dyninst/test1_37.C @@ -166,8 +166,8 @@ static void instrumentLoops(BPatch_addressSpace *appAddrSpace, BPatch_image *app static int instrumentFuncLoopsWithCall(BPatch_addressSpace *appAddrSpace, BPatch_image *appImage, - char *call_func, - char *inc_func) + const char *call_func, + const char *inc_func) { // get function * for call_func BPatch_Vector<BPatch_function *> funcs; @@ -204,8 +204,8 @@ static int instrumentFuncLoopsWithCall(BPatch_addressSpace *appAddrSpace, static int instrumentFuncLoopsWithInc(BPatch_addressSpace *appAddrSpace, BPatch_image *appImage, - char *call_func, - char *var) + const char *call_func, + const char *var) { // get function * for call_func BPatch_Vector<BPatch_function *> funcs; diff --git a/src/dyninst/test1_9.C b/src/dyninst/test1_9.C index 49a05b9..9ec5d3f 100644 --- a/src/dyninst/test1_9.C +++ b/src/dyninst/test1_9.C @@ -88,7 +88,7 @@ test_results_t test1_9_Mutator::executeTest() } BPatch_Vector<BPatch_function *> bpfv; - char *fn = "test1_9_call1"; + const char *fn = "test1_9_call1"; if (NULL == appImage->findFunction(fn, bpfv) || !bpfv.size() || NULL == bpfv[0]) { diff --git a/src/dyninst/test4_3_mutatee.c b/src/dyninst/test4_3_mutatee.c index 70c55a7..f944c2e 100644 --- a/src/dyninst/test4_3_mutatee.c +++ b/src/dyninst/test4_3_mutatee.c @@ -114,7 +114,7 @@ int test4_3_mutatee() { */ /* FIXME this may screw up if there's more than one '-run' specified */ if (strcmp(newArgv[i], "-run") == 0) { - newArgv[i + 1] = "test4_3b"; + newArgv[i + 1] = strdup("test4_3b"); } } diff --git a/src/dyninst/test4_4_mutatee.c b/src/dyninst/test4_4_mutatee.c index 552f1ec..79f7630 100644 --- a/src/dyninst/test4_4_mutatee.c +++ b/src/dyninst/test4_4_mutatee.c @@ -112,7 +112,7 @@ int test4_4_mutatee() */ for (i = 1; i < argc; i++) { if (strcmp(newArgv[i], "-run") == 0) { - newArgv[i + 1] = "test4_4b"; + newArgv[i + 1] = strdup("test4_4b"); } } diff --git a/src/dyninst/test_callback_2.C b/src/dyninst/test_callback_2.C index 1305202..95fc09f 100644 --- a/src/dyninst/test_callback_2.C +++ b/src/dyninst/test_callback_2.C @@ -181,7 +181,7 @@ static void test7cb(BPatch_process * proc, void *buf, unsigned int bufsize) if (proc->getPid() != tid) { - fprintf(stderr, "%s[%d]: ERROR: got event for pid %lu, not %lu\n", FILE__, __LINE__, tid, proc->getPid()); + fprintf(stderr, "%s[%d]: ERROR: got event for pid %lu, not %d\n", FILE__, __LINE__, tid, proc->getPid()); } if (callback_counter == 0) { diff --git a/src/dyninst/test_thread_1_mutatee.c b/src/dyninst/test_thread_1_mutatee.c index 8931433..46b11ea 100644 --- a/src/dyninst/test_thread_1_mutatee.c +++ b/src/dyninst/test_thread_1_mutatee.c @@ -154,7 +154,7 @@ int func1_1() int lockres; int bigTIMEOUT; int timeout; - char *libname; + const char *libname; /*pthread_attr_t attr;*/ unsigned int i; void *RTlib; diff --git a/src/dynlmon.C b/src/dynlmon.C index 2744538..1fbb153 100644 --- a/src/dynlmon.C +++ b/src/dynlmon.C @@ -353,7 +353,7 @@ int LMONInvoke(RunGroup *group, ParameterDict params, char *test_args[], char *d char newbuffer[64]; snprintf(newbuffer, 64, "%d:%d", group->index, mutatee_pid); - new_daemon_args[i++] = "-given_mutatee"; + new_daemon_args[i++] = const_cast<char*>("-given_mutatee"); new_daemon_args[i++] = newbuffer; new_daemon_args[i++] = NULL; diff --git a/src/libtestA.c b/src/libtestA.c index 9a7be75..90a7606 100644 --- a/src/libtestA.c +++ b/src/libtestA.c @@ -56,7 +56,7 @@ extern "C" { */ DLLEXPORT int call21_1() { - printf("This function was not meant to be called %d!\n"); + printf("This function was not meant to be called!\n"); return -1; } diff --git a/src/mutatee_call_info.h b/src/mutatee_call_info.h index 69fed61..6ca99ff 100644 --- a/src/mutatee_call_info.h +++ b/src/mutatee_call_info.h @@ -37,10 +37,10 @@ typedef enum { } grouped_mutatee_t; typedef struct { - char *testname; + const char *testname; int (*func)(void); grouped_mutatee_t grouped; - char *testlabel; + const char *testlabel; } mutatee_call_info_t; typedef struct _mutatee_info { diff --git a/src/mutatee_util.c b/src/mutatee_util.c index 342c8a8..2c68ac8 100644 --- a/src/mutatee_util.c +++ b/src/mutatee_util.c @@ -75,11 +75,11 @@ static long long int beginFP; /* New output driver system */ output_t *output = NULL; -char *loginfofn = "-"; -char *logerrfn = "-"; -char *stdoutfn = "-"; -char *stderrfn = "-"; -char *humanfn = "-"; +char *loginfofn = (char*)"-"; +char *logerrfn = (char*)"-"; +char *stdoutfn = (char*)"-"; +char *stderrfn = (char*)"-"; +char *humanfn = (char*)"-"; static char *od_testname = NULL; void warningLogResult(test_results_t result) { @@ -125,7 +125,7 @@ void redirectStream(output_stream_t stream, const char *filename) { if (NULL == filename) { stdoutfn = NULL; } else if (strcmp(filename, "-") == 0) { - stdoutfn = "-"; + stdoutfn = (char *)"-"; } else { stdoutfn = (char *) malloc(length * sizeof (*stdoutfn)); if (stdoutfn != NULL) { @@ -141,7 +141,7 @@ void redirectStream(output_stream_t stream, const char *filename) { if (NULL == filename) { stderrfn = NULL; } else if (strcmp(filename, "-") == 0) { - stderrfn = "-"; + stderrfn = (char *)"-"; } else { stderrfn = (char *) malloc(length * sizeof (*stderrfn)); if (stderrfn != NULL) { @@ -157,7 +157,7 @@ void redirectStream(output_stream_t stream, const char *filename) { if (NULL == filename) { loginfofn = NULL; } else if (strcmp(filename, "-") == 0) { - loginfofn = "-"; + loginfofn = (char *)"-"; } else { loginfofn = (char *) malloc(length * sizeof (*loginfofn)); if (loginfofn != NULL) { @@ -173,7 +173,7 @@ void redirectStream(output_stream_t stream, const char *filename) { if (NULL == filename) { logerrfn = NULL; } else if (strcmp(filename, "-") == 0) { - logerrfn = "-"; + logerrfn = (char *)"-"; } else { logerrfn = (char *) malloc(length * sizeof (*logerrfn)); if (logerrfn != NULL) { @@ -189,7 +189,7 @@ void redirectStream(output_stream_t stream, const char *filename) { if (NULL == filename) { humanfn = NULL; } else if (strcmp(filename, "-") == 0) { - humanfn = "-"; + humanfn = (char *)"-"; } else { humanfn = (char *) malloc(length * sizeof (*humanfn)); if (humanfn != NULL) { @@ -310,7 +310,7 @@ void flushErrorLog() { /* Support functions for database output driver */ /************************************************/ -static char *temp_logfilename = "mutatee_dblog"; +static const char *temp_logfilename = "mutatee_dblog"; static char *dblog_filename = NULL; /* Redirect all output to a file, so test_driver can pick it up when it's @@ -512,7 +512,7 @@ void setUseAttach(int v) { } /* Filename for single line test results output */ -char *humanlog_name = "-"; +const char *humanlog_name = "-"; /* Change this to default to FALSE once test_driver is passing -humanlog * parameter to the mutatee */ @@ -653,9 +653,9 @@ int verifyScalarValue(const char *name, int a, int value, return TRUE; } -char *resumelog_name = "mutatee_resumelog"; +const char *resumelog_name = "mutatee_resumelog"; -void log_testrun(char *testname) +void log_testrun(const char *testname) { FILE *f = fopen(resumelog_name, "a"); if (!f) { diff --git a/src/mutatee_util.h b/src/mutatee_util.h index 1df6f7a..b534c47 100644 --- a/src/mutatee_util.h +++ b/src/mutatee_util.h @@ -161,7 +161,7 @@ extern void logerror(const char *fmt, ...); extern void flushOutputLog(); extern void flushErrorLog(); -extern void log_testrun(char *testname); +extern void log_testrun(const char *testname); extern void log_testresult(int passed); /* Mutatee cleanup: PID registration */ @@ -175,7 +175,7 @@ extern char *executable_name; extern void setExecutableName(const char *new_name); extern int use_attach; extern void setUseAttach(int v); -extern char *humanlog_name; +extern const char *humanlog_name; extern int use_humanlog; extern void setHumanLog(const char *new_name); extern void printResultHumanLog(const char *testname, test_results_t result); @@ -211,7 +211,7 @@ extern unsigned long thread_int(thread_t a); extern void schedYield(); extern void *loadDynamicLibrary(char *name); -extern void *getFuncFromDLL(void *libhandle, char *func_name); +extern void *getFuncFromDLL(void *libhandle, const char *func_name); extern void test_passes(const char *testname); extern void test_fails(const char *testname); diff --git a/src/proccontrol/pc_breakpoint_mutatee.c b/src/proccontrol/pc_breakpoint_mutatee.c index fa2a42f..ca1fd83 100644 --- a/src/proccontrol/pc_breakpoint_mutatee.c +++ b/src/proccontrol/pc_breakpoint_mutatee.c @@ -105,18 +105,18 @@ int pc_breakpoint_mutatee() //output->log(STDERR, "Initialized OK\n"); bp_addr_msg.code = (uint32_t) SENDADDR_CODE; - bp_addr_msg.addr = getFunctionPtr((unsigned long *)bp0); + bp_addr_msg.addr = getFunctionPtr((intptr_t *)bp0); result = send_message((unsigned char *) &bp_addr_msg, sizeof(send_addr)); if (result == 0) { - bp_addr_msg.addr = getFunctionPtr((unsigned long *)bp1); + bp_addr_msg.addr = getFunctionPtr((intptr_t *)bp1); result = send_message((unsigned char *) &bp_addr_msg, sizeof(send_addr)); } if (result == 0) { - bp_addr_msg.addr = getFunctionPtr((unsigned long *)bp2); + bp_addr_msg.addr = getFunctionPtr((intptr_t *)bp2); result = send_message((unsigned char *) &bp_addr_msg, sizeof(send_addr)); } if (result == 0) { - bp_addr_msg.addr = getFunctionPtr((unsigned long *)bp3); + bp_addr_msg.addr = getFunctionPtr((intptr_t *)bp3); result = send_message((unsigned char *) &bp_addr_msg, sizeof(send_addr)); } diff --git a/src/proccontrol/pc_fork_exec_mutatee.c b/src/proccontrol/pc_fork_exec_mutatee.c index 3100c77..3d63bd8 100644 --- a/src/proccontrol/pc_fork_exec_mutatee.c +++ b/src/proccontrol/pc_fork_exec_mutatee.c @@ -58,8 +58,8 @@ static int threadFunc(int myid, void *data) char *args[4]; args[0] = exec_name; - args[1] = "-run"; - args[2] = "pc_exec_targ"; + args[1] = strdup("-run"); + args[2] = strdup("pc_exec_targ"); args[3] = NULL; if (pid == -1) { diff --git a/src/proccontrol/pc_fork_mutatee.c b/src/proccontrol/pc_fork_mutatee.c index 597e0f5..3473f09 100644 --- a/src/proccontrol/pc_fork_mutatee.c +++ b/src/proccontrol/pc_fork_mutatee.c @@ -176,7 +176,7 @@ int pc_fork_mutatee() } addr_msg.code = SENDADDR_CODE; - addr_msg.addr = getFunctionPtr((unsigned long *)bp_func); + addr_msg.addr = getFunctionPtr((intptr_t *)bp_func); result = send_message((unsigned char *) &addr_msg, sizeof(addr_msg)); if (result == -1) { output->log(STDERR, "Failed to send addr message\n"); diff --git a/src/proccontrol/pc_groups_mutatee.c b/src/proccontrol/pc_groups_mutatee.c index 5be3e28..3f07cad 100644 --- a/src/proccontrol/pc_groups_mutatee.c +++ b/src/proccontrol/pc_groups_mutatee.c @@ -192,7 +192,7 @@ int pc_groups_mutatee() data = 4; send_addrs(&data); - send_addrs((void *)getFunctionPtr((unsigned long *)bp_func)); + send_addrs((void *)getFunctionPtr((intptr_t *)bp_func)); #if !defined(os_windows_test) /* Windows does it mutator-side */ diff --git a/src/proccontrol/pc_hw_breakpoint_mutatee.c b/src/proccontrol/pc_hw_breakpoint_mutatee.c index 0db0533..5510dc3 100644 --- a/src/proccontrol/pc_hw_breakpoint_mutatee.c +++ b/src/proccontrol/pc_hw_breakpoint_mutatee.c @@ -222,41 +222,41 @@ int pc_hw_breakpoint_mutatee() initBarrier(barrier, num_threads+1); bp_addr_msg.code = (uint32_t) SENDADDR_CODE; - bp_addr_msg.addr = (uint64_t) &rw_bp; + bp_addr_msg.addr = (intptr_t) &rw_bp; /* bp 0 */ result = send_message((unsigned char *) &bp_addr_msg, sizeof(send_addr)); if (result == 0) { - bp_addr_msg.addr = (uint64_t) &r_bp; + bp_addr_msg.addr = (intptr_t) &r_bp; /* bp 1 */ result = send_message((unsigned char *) &bp_addr_msg, sizeof(send_addr)); } if (result == 0) { - bp_addr_msg.addr = (uint64_t) &w_bp; + bp_addr_msg.addr = (intptr_t) &w_bp; /* bp 2 */ result = send_message((unsigned char *) &bp_addr_msg, sizeof(send_addr)); } if (result == 0) { - bp_addr_msg.addr = getFunctionPtr((unsigned long *) x_bp); + bp_addr_msg.addr = getFunctionPtr((intptr_t *) x_bp); /* bp 3 */ result = send_message((unsigned char *) &bp_addr_msg, sizeof(send_addr)); } if (result == 0) { - bp_addr_msg.addr = getFunctionPtr((unsigned long *) rwx_bp); + bp_addr_msg.addr = getFunctionPtr((intptr_t *) rwx_bp); /* bp 4 */ result = send_message((unsigned char *) &bp_addr_msg, sizeof(send_addr)); } if (result == 0) { - bp_addr_msg.addr = getFunctionPtr((unsigned long *) &r2_bp); + bp_addr_msg.addr = getFunctionPtr((intptr_t *) &r2_bp); /* bp 5 */ result = send_message((unsigned char *) &bp_addr_msg, sizeof(send_addr)); } if (result == 0) { - bp_addr_msg.addr = getFunctionPtr((unsigned long *) &w2_bp); + bp_addr_msg.addr = getFunctionPtr((intptr_t *) &w2_bp); /* bp 6 */ result = send_message((unsigned char *) &bp_addr_msg, sizeof(send_addr)); } if (result == 0) { - bp_addr_msg.addr = getFunctionPtr((unsigned long *) x2_bp); + bp_addr_msg.addr = getFunctionPtr((intptr_t *) x2_bp); /* bp 7 */ result = send_message((unsigned char *) &bp_addr_msg, sizeof(send_addr)); } diff --git a/src/proccontrol/pc_irpc_mutatee.c b/src/proccontrol/pc_irpc_mutatee.c index c4c9c1d..73706f3 100644 --- a/src/proccontrol/pc_irpc_mutatee.c +++ b/src/proccontrol/pc_irpc_mutatee.c @@ -83,7 +83,7 @@ int pc_irpc_mutatee() } addr_msg.code = SENDADDR_CODE; - addr_msg.addr = getFunctionPtr((unsigned long *)irpc_calltarg); + addr_msg.addr = getFunctionPtr((intptr_t *)irpc_calltarg); result = send_message((unsigned char *) &addr_msg, sizeof(addr_msg)); if (result == -1) { output->log(STDERR, "Failed to send func addr message\n"); @@ -98,14 +98,14 @@ int pc_irpc_mutatee() return -1; } - addr_msg.addr = (uint64_t) &val; + addr_msg.addr = (intptr_t) &val; result = send_message((unsigned char *) &addr_msg, sizeof(addr_msg)); if (result == -1) { output->log(STDERR, "Failed to send val addr message\n"); return -1; } - addr_msg.addr = (uint64_t) &busywait; + addr_msg.addr = (intptr_t) &busywait; result = send_message((unsigned char *) &addr_msg, sizeof(addr_msg)); if (result == -1) { output->log(STDERR, "Failed to send busywait addr message\n"); diff --git a/src/proccontrol/pc_singlestep_mutatee.c b/src/proccontrol/pc_singlestep_mutatee.c index 806b34b..a9b19a0 100644 --- a/src/proccontrol/pc_singlestep_mutatee.c +++ b/src/proccontrol/pc_singlestep_mutatee.c @@ -137,7 +137,7 @@ int pc_singlestep_mutatee() addr_msg.code = SENDADDR_CODE; - addr_msg.addr = getFunctionPtr((unsigned long *)run_all_funcs); + addr_msg.addr = getFunctionPtr((intptr_t *)run_all_funcs); result = send_message((unsigned char *) &addr_msg, sizeof(addr_msg)); if (result == -1) { output->log(STDERR, "Failed to send addr message for initial breakpoint func\n"); @@ -146,7 +146,7 @@ int pc_singlestep_mutatee() } for (i = 0; i < NUM_FUNCS; i++) { - addr_msg.addr = getFunctionPtr((unsigned long *)funcs[i]); + addr_msg.addr = getFunctionPtr((intptr_t *)funcs[i]); result = send_message((unsigned char *) &addr_msg, sizeof(addr_msg)); if (result == -1) { output->log(STDERR, "Failed to send addr message\n"); diff --git a/src/proccontrol/pc_tls_mutatee.c b/src/proccontrol/pc_tls_mutatee.c index e79d36a..e5ccd50 100644 --- a/src/proccontrol/pc_tls_mutatee.c +++ b/src/proccontrol/pc_tls_mutatee.c @@ -29,7 +29,9 @@ */ #if defined(os_linux_test) +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include <link.h> #endif @@ -186,7 +188,7 @@ int pc_tls_mutatee() } bp_addr_msg.code = (uint32_t) SENDADDR_CODE; - bp_addr_msg.addr = getFunctionPtr((unsigned long *) breakpoint_func); + bp_addr_msg.addr = getFunctionPtr((intptr_t *) breakpoint_func); result = send_message((unsigned char *) &bp_addr_msg, sizeof(send_addr)); if (result != 0) { output->log(STDERR, "Failed to send breakpoint addresses\n"); diff --git a/src/proccontrol/pcontrol_mutatee_tools.c b/src/proccontrol/pcontrol_mutatee_tools.c index 0f9efaf..08cc617 100644 --- a/src/proccontrol/pcontrol_mutatee_tools.c +++ b/src/proccontrol/pcontrol_mutatee_tools.c @@ -164,7 +164,7 @@ int MultiThreadInit(int (*init_func)(int, void*), void *thread_data) } -uint64_t getFunctionPtr(unsigned long *ptr) { +intptr_t getFunctionPtr(intptr_t *ptr) { unsigned long tmpAddr; #if defined(arch_power_test) && defined(arch_64bit_test) /* need to dereference function pointers before sending them to mutator */ @@ -180,15 +180,15 @@ uint64_t getFunctionPtr(unsigned long *ptr) { /* Jump byte */ opcode++; offsetPtr = (int *)opcode; - tmpAddr = (unsigned long) (((unsigned long) ptr) + 5 + *offsetPtr); + tmpAddr = (intptr_t) (((unsigned long) ptr) + 5 + *offsetPtr); } else { - tmpAddr = (unsigned long)ptr; + tmpAddr = (intptr_t)ptr; } #else - tmpAddr = (unsigned long)ptr; + tmpAddr = (intptr_t)ptr; #endif - return (uint64_t)tmpAddr; + return (intptr_t)tmpAddr; } uint64_t getTOCValue(unsigned long *ptr) { diff --git a/src/proccontrol/pcontrol_mutatee_tools.h b/src/proccontrol/pcontrol_mutatee_tools.h index 41f1b79..fbb1af7 100644 --- a/src/proccontrol/pcontrol_mutatee_tools.h +++ b/src/proccontrol/pcontrol_mutatee_tools.h @@ -51,7 +51,7 @@ int releaseThreads(); int send_message(unsigned char *msg, size_t msg_size); int recv_message(unsigned char *msg, size_t msg_size); -uint64_t getFunctionPtr(unsigned long *ptr); +intptr_t getFunctionPtr(intptr_t *ptr); uint64_t getTOCValue(unsigned long *ptr); #endif diff --git a/src/proccontrol/proccontrol_comp.C b/src/proccontrol/proccontrol_comp.C index 1bcabef..24bc564 100644 --- a/src/proccontrol/proccontrol_comp.C +++ b/src/proccontrol/proccontrol_comp.C @@ -1077,7 +1077,7 @@ bool ProcControlComponent::acceptConnections(int num, int *attach_sock) int result = select(nfds, &readset, &writeset, &exceptset, &timeout); if (result == 0) { logerror("Timeout while waiting for socket connect"); - fprintf(stderr, "[%s:%u] - Have recieved %d / %d socks\n", __FILE__, __LINE__, socks.size(), num); + fprintf(stderr, "[%s:%u] - Have received %lu / %d socks\n", __FILE__, __LINE__, socks.size(), num); return false; } if (result == -1) { diff --git a/src/remotetest.C b/src/remotetest.C index c62fd89..c5c1e85 100644 --- a/src/remotetest.C +++ b/src/remotetest.C @@ -76,7 +76,7 @@ static void encodeParams(ParameterDict ¶ms, MessageBuffer &buf) { result += std::string("p:"); char p_buffer[32]; - snprintf(p_buffer, 32, "%lu:", i->second->getPtr()); + snprintf(p_buffer, 32, "%p:", i->second->getPtr()); result += p_buffer; } else { diff --git a/src/runTests-utils.C b/src/runTests-utils.C index c3c6f92..ae22b86 100644 --- a/src/runTests-utils.C +++ b/src/runTests-utils.C @@ -64,7 +64,7 @@ void cleanupMutatees(char *pidFilename) { break; if (pid < 1) { - fprintf(stderr, "[%s:%u] - Read a negative PID (%d). Something's weird.\n", __FILE__, __LINE__); + fprintf(stderr, "[%s:%u] - Read a negative PID (%d). Something's weird.\n", __FILE__, __LINE__, pid); continue; } diff --git a/src/runTests.C b/src/runTests.C index ccecd0c..d36fff4 100644 --- a/src/runTests.C +++ b/src/runTests.C @@ -296,9 +296,9 @@ int main(int argc, char *argv[]) if (parallel_copies > 1) { - test_drivers[i].child_argv.push_back("-unique"); + test_drivers[i].child_argv.push_back(const_cast<char*>("-unique")); test_drivers[i].child_argv.push_back(strdup(unique_cs)); - test_drivers[i].child_argv.push_back("-max-unique"); + test_drivers[i].child_argv.push_back(const_cast<char*>("-max-unique")); test_drivers[i].child_argv.push_back(parallel_copies_cs); test_drivers[i].outputlog = std::string("par_outputlog.") + unique_s; @@ -308,7 +308,7 @@ int main(int argc, char *argv[]) test_drivers[i].child_argv[outputlog_pos] = const_cast<char *>(test_drivers[i].outputlog.c_str()); } else { - test_drivers[i].child_argv.push_back("-humanlog"); + test_drivers[i].child_argv.push_back(const_cast<char*>("-humanlog")); test_drivers[i].child_argv.push_back(const_cast<char *>(test_drivers[i].outputlog.c_str())); } if (outputlog_name && (strcmp(outputlog_name, "-") != 0)) { diff --git a/src/symtab/test_anno_basic_types.C b/src/symtab/test_anno_basic_types.C index 230084d..e71c5a8 100644 --- a/src/symtab/test_anno_basic_types.C +++ b/src/symtab/test_anno_basic_types.C @@ -254,7 +254,7 @@ test_results_t test_anno_basic_types_Mutator::executeTest() { fprintf(stderr, "%s[%d]: ERROR, size creep in sparse annotation class\n", FILE__, __LINE__); - fprintf(stderr, "sizeof(TestClass) = %d, sizeof(TestClassSparse) = %d\n", + fprintf(stderr, "sizeof(TestClass) = %lu, sizeof(TestClassSparse) = %lu\n", sizeof(TestClass), sizeof(TestClassSparse)); return FAILED; } @@ -264,7 +264,7 @@ test_results_t test_anno_basic_types_Mutator::executeTest() { fprintf(stderr, "%s[%d]: ERROR, size creep in dense annotation class\n", FILE__, __LINE__); - fprintf(stderr, "sizeof(TestClass) + sizeof(void *)= %d, sizeof(TestClassDense) = %d\n", + fprintf(stderr, "sizeof(TestClass) + sizeof(void *)= %lu, sizeof(TestClassDense) = %lu\n", sizeof(TestClass) + sizeof(void *), sizeof(TestClassDense)); return FAILED; } diff --git a/src/symtab/test_relocations.C b/src/symtab/test_relocations.C index dbcfb66..5b4735a 100644 --- a/src/symtab/test_relocations.C +++ b/src/symtab/test_relocations.C @@ -275,7 +275,7 @@ test_results_t test_relocations_Mutator::executeTest() if (num_found != expected_relocs.size()) { - fprintf(stderr, "%s[%d]: found %d relocs, not the expected %d\n", + fprintf(stderr, "%s[%d]: found %d relocs, not the expected %ld\n", FILE__, __LINE__, num_found, expected_relocs.size()); return FAILED; } -- 2.8.2 _______________________________________________ Dyninst-api mailing list Dyninst-api@cs.wisc.edu https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api