-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dr. Memory fails on DR assertion when an empty or trivial .cpp file is added to the build #544
Comments
From [email protected] on August 30, 2011 07:43:40 the "Patch 2" errore are issue #486 and issue #487 , right? |
From [email protected] on August 30, 2011 08:38:34
|
From [email protected] on August 30, 2011 08:59:38 :::Dr.Memory::: :::Dr.Memory::: ERRORS FOUND: :::Dr.Memory::: 0 unique, 0 total warning(s) ... Works OK w/o the patch |
From [email protected] on August 30, 2011 09:37:26 Patch 2 crashes with [both Debug and Release] which looks exactly the same way as on Windows |
From [email protected] on September 01, 2011 08:38:15
We would love to have more C++ samples and tests if you're interested in contributing |
From [email protected] on September 01, 2011 08:46:33
But the question was different: are there any clients that do use C++ but not affected by this issue? |
From [email protected] on September 01, 2011 08:48:16
|
From [email protected] on September 01, 2011 08:51:09
not that I'm aware of |
From [email protected] on September 23, 2011 10:42:13 I believe patch 2, on Windows, is nothing more than issue #487 , issue #486 , and issue #560 patch 1, on Windows, is failure to find SxS dir dynamically (have to read manifest file): issue #233 privload_process_imports: drmemorylib.dll imports from MSVCR80.dll leaving open for investigating whether the Linux failure is new or a dup of existing issues Status: |
From [email protected] on September 23, 2011 12:03:20 for patch 1, solved by adding libcpmt and libcmt explicitly to C++ clients in % git diff
if (WIN32)
our addr2line for Windowsadd_executable(winsyms tools/winsyms.c) dlls are put in runtime dir but we want lib dirRUNTIME_OUTPUT_DIRECTORY${location_suffix} "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+# target_link_libraries(${client_target} ntdll msvcrt)
get_target_property(cur_flags ${client_target} LINK_FLAGS) |
From [email protected] on August 30, 2011 05:40:45
Initially filed as https://code.google.com/p/drmemory/issues/detail?id=440 but turns out it's more of a DR problem.
In short, Dr. Memory is a C-only client.
When I try to add a simple C++ file it crashes on start with different symptoms in different configurations.
I'm seeing the following results as of r958 (DrM revision 482 )
Patch 1:
$ git diff trunk
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 151386b..572f288 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -632,6 +632,7 @@ else (TOOL_DR_HEAPSTAT)
drmemory/alloc_drmem.c
drmemory/syscall.c
drmemory/report.c
drmemory/replace.c
drmemory/leak.c
drmemory/perturb.c
diff --git a/drmemory/empty.cpp b/drmemory/empty.cpp
new file mode 100755
index 0000000..5f7c77d
--- /dev/null
+++ b/drmemory/empty.cpp
@@ -0,0 +1 @@
+//
$ mkdir debug && cd debug
$ cmake -DCMAKE_BUILD_TYPE=Debug .. && cmake --build .
$ ./bin/drmemory.exe -- ./tests/hello.exe
DynamoRIO usage error : failure to process imports of client library (dynamorio\core\loader_shared.c, line 120)
the Release build fails to start with a few "WARNING: unable to locate results file since can't open .../resfile" lines printed to stderr.
Patch 2: [attached] // also replaces msvcrt linking with libcmt[d] and adds some simple C++ code to run.
A larger patch (attached) fails in the Debug build (both DR and DrM are Debug):
...
Usage error: privately-loaded library executed by app:
please report this transparency violation (dynamorio\core\vmareas.c, line 7261)
...
CURIOSITY : name[1] == ':' && (name[2] == '/' || name[2] == '') && "create file invalid name"
in file dynamorio\core\win32\os.c line 4479
// name = "USER32.DLL" while the drive letter is expected?
If I use Release DR (regardless of the DrM build) it works fine with the second patch.
Are there any known C++ DR clients except for stl_test?
Attachment: empty_cpp_drm.patch
Original issue: http://code.google.com/p/dynamorio/issues/detail?id=544
The text was updated successfully, but these errors were encountered: