A couple of minor fixes

1. Fixing ExceptionHandlerTest.FirstChanceHandlerRuns:
   exit() is not an async-signal-safe function (http://man7.org/linux/man-pages/man7/signal-safety.7.html)

2. Fixing entry point signature in minidump_dump
  Changed "const char* argv[]" to "char* argv[]" to match the standard entry point signature

3. Updating .gitignore to exclude unit test artifacts

Change-Id: I9662898d0bd97769621fb6476a720105821c60f0
Reviewed-on: https://chromium-review.googlesource.com/562356
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
Leonard Mosescu 2017-07-06 10:58:40 -07:00 committed by Mark Mentovai
parent 66856d617b
commit 5f112cb174
3 changed files with 9 additions and 4 deletions

5
.gitignore vendored
View file

@ -50,6 +50,11 @@ lib*.a
/src/tools/mac/dump_syms/dump_syms
/src/tools/mac/dump_syms/dump_syms_mac
# Ignore unit test artifacts.
*_unittest
*.log
*.trs
# Ignore autotools generated artifacts.
.deps
.dirstamp

View file

@ -468,7 +468,7 @@ TEST(ExceptionHandlerTest, StackedHandlersUnhandledToBottom) {
namespace {
const int kSimpleFirstChanceReturnStatus = 42;
bool SimpleFirstChanceHandler(int, void*, void*) {
exit(kSimpleFirstChanceReturnStatus);
_exit(kSimpleFirstChanceReturnStatus);
}
}

View file

@ -212,7 +212,7 @@ static bool PrintMinidumpDump(const Options& options) {
//=============================================================================
static void
Usage(int argc, const char *argv[], bool error) {
Usage(int argc, char *argv[], bool error) {
FILE *fp = error ? stderr : stdout;
fprintf(fp,
@ -228,7 +228,7 @@ Usage(int argc, const char *argv[], bool error) {
//=============================================================================
static void
SetupOptions(int argc, const char *argv[], Options *options) {
SetupOptions(int argc, char *argv[], Options *options) {
int ch;
while ((ch = getopt(argc, (char * const *)argv, "xh")) != -1) {
@ -257,7 +257,7 @@ SetupOptions(int argc, const char *argv[], Options *options) {
} // namespace
int main(int argc, const char *argv[]) {
int main(int argc, char *argv[]) {
Options options;
BPLOG_INIT(&argc, &argv);
SetupOptions(argc, argv, &options);