Skip to content
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

indicate app exit code #1323

Closed
derekbruening opened this issue Nov 28, 2014 · 2 comments
Closed

indicate app exit code #1323

derekbruening opened this issue Nov 28, 2014 · 2 comments

Comments

@derekbruening
Copy link
Contributor

From [email protected] on September 04, 2013 18:07:58

I noticed this when using DrMem as an External Tool in the VS IDE: the
app's exit code is not indicated by VS, so it's hard to tell whether it
crashed. Perhaps DrMem should print a message on a non-0 exit code. I'd
also add the code to the bottom of global.log, if not somewhere in
results.txt.

Xref issue #1015 .

Unfortunately we need DR issue #1260 to do this cleanly. For now I may just add
to the DrMem frontend for Windows-only.

Original issue: http://code.google.com/p/drmemory/issues/detail?id=1323

@derekbruening
Copy link
Contributor Author

From [email protected] on September 04, 2013 16:03:59

To make it look nice in VS I ended up having to parse -prefix_style in
frontend which is a little ugly but I like the prefix appearing on this
particular message, just like it does on the symbol loading messages.

In cygwin shell:
% bin/drmemory.exe -batch -dr d:/derek/dr/git/exports -- d:/derek/dr/git/build_x86_dbg_tests/suite/tests/bin/common.segfault.exe
Dr.M Dr. Memory version 1.5.1525
Dr.M Running "d:/derek/dr/git/build_x86_dbg_tests/suite/tests/bin/common.segfault.exe"
Segfault about to happen
Dr.M
Dr.M Error #1: UNADDRESSABLE ACCESS: writing 0x00000000-0x00000004 4 byte(s)
Dr.M # 0 main [d:\derek\dr\git\src\suite\tests\common\segfault.c:98]
Dr.M Note: @0:00:00.447 in thread 4372
Dr.M Note: instruction: mov $0x00000004 -> 0x00
Got a seg fault
Dr.M
Dr.M ERRORS FOUND:
Dr.M 1 unique, 1 total unaddressable access(es)
Dr.M 0 unique, 0 total uninitialized access(es)
Dr.M 0 unique, 0 total invalid heap argument(s)
Dr.M 0 unique, 0 total GDI usage error(s)
Dr.M 0 unique, 0 total warning(s)
Dr.M 0 unique, 0 total, 0 byte(s) of leak(s)
Dr.M 0 unique, 0 total, 0 byte(s) of possible leak(s)
Dr.M ERRORS IGNORED:
Dr.M 188 still-reachable allocation(s)
Dr.M (re-run with "-show_reachable" for details)
Dr.M Details: D:\derek\drmemory\git\build_x86_dbg\logs\DrMemory-common.segfault.exe.10380.000\results.txt
Dr.M WARNING: application exited with abnormal code 0xc0000005
Segmentation fault

In Visual Studio:
Dr. Memory version 1.5.1525
Running ""C:\Users\derek\Documents\Visual Studio 2010\Projects\stl\Debug\stl.exe" display simple_font.txt hello @ -"

     Error `#1`: UNADDRESSABLE ACCESS: reading 1 byte(s)
     main   
         c:\users\derek\documents\visual studio 2010\projects\stl\stl\solution.cpp(58):

     Error `#2`: LEAK 8 bytes 
     ...         

     ERRORS FOUND:
           1 unique,     1 total unaddressable access(es)
           0 unique,     0 total uninitialized access(es)
           0 unique,     0 total invalid heap argument(s)
           0 unique,     0 total GDI usage error(s)
           0 unique,     0 total warning(s)
           2 unique,     2 total,     16 byte(s) of leak(s)
           1 unique,     1 total,  78848 byte(s) of possible leak(s)
     Details: D:\derek\drmemory\git\build_x86_dbg\logs\DrMemory-stl.exe.4724.000\results.txt
     WARNING: application exited with abnormal code 0xc0000005

@derekbruening
Copy link
Contributor Author

From [email protected] on September 05, 2013 16:04:36

This issue was closed by revision r1527 .

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant