summaryrefslogtreecommitdiff
path: root/retrace/daemon/ui/main.cpp
diff options
context:
space:
mode:
authorMark Janes <mark.a.janes@intel.com>2016-07-29 06:13:24 -0700
committerMark Janes <mark.a.janes@intel.com>2017-06-19 14:04:47 -0700
commit28c3aa814a1c3de3dee3c1e3f4acece068628866 (patch)
tree956840e394e11216d469f7f8939927844d02b1a5 /retrace/daemon/ui/main.cpp
parent7ec885954058ecd88fd4a05661c2cbf0a3e1195b (diff)
Examples of string memory errors with Windows DLLs
This patch got me past string errors probably caused by MT/MD link incompatibilities. I'm preserving them because there may be a way to handle memory between the libraries which fixes the issue without re-engineering cmake and the link options of the libraries. For example, maybe I can use a C interface in problematic instances.
Diffstat (limited to 'retrace/daemon/ui/main.cpp')
-rw-r--r--retrace/daemon/ui/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/retrace/daemon/ui/main.cpp b/retrace/daemon/ui/main.cpp
index 15fecc11..b59fae21 100644
--- a/retrace/daemon/ui/main.cpp
+++ b/retrace/daemon/ui/main.cpp
@@ -68,9 +68,11 @@ void exec_retracer(const char *main_exe, int port) {
std::stringstream port_s;
port_s << port;
+ std::string port_str = port_s.str();
+ const char *port_c = port_str.c_str();
const char *const args[] = {server_exe.c_str(),
"-p",
- port_s.str().c_str(),
+ port_c,
NULL};
glretrace::fork_execv(server_exe.c_str(), args);
}