https://bugs.kde.org/show_bug.cgi?id=400807
Bug ID: 400807 Summary: --error-exitcode still sends the wrong value Product: valgrind Version: 3.12 SVN Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: memcheck Assignee: jsew...@acm.org Reporter: andrew.penneba...@gmail.com Target Milestone: --- I want to valgrind my entire application, not just the small, successful use cases. For example, I expect my app to exit with code 1 when the CLI flag syntax is wrong. However, it is difficult to check that flow in my app for leaks, as valgrind returns the wrong exit code in this case. I expected --error-exitcode=1 --leak-check=full to specifically exit non-zero from valgrind when leaks are found, not when my app exits non-zero. My app does not allocate any memory when the CLI syntax is wrong, so valgrind should simply exit 0. However, in practice, valgrind forwards my app's exit value instead. I realize that this kind of situation is difficult to manage: What should valgrind do when the application has no leaks, but is otherwise broken, such as exiting non-zero for a valid input; or exiting non-zero because the app does not have executable bits / is not found on $PATH? Would be nice to have a flag to indicate that an application can be found, can run, has no leaks, and yet is expected to exit non-zero, and so valgrind itself should exit non-zero if and only if leaks are found. Does that make sense? -- You are receiving this mail because: You are watching all bug changes.