Bring our native stack usage down.
I'd have preferred to have a 512-byte limit, but there are some monsters
in the verifier; 2000-line functions and the like. I'm also not policing
tests (except for one silly one). They can use all the stack they like.
This fixes the IntMath test (the stack overflow test was failing because
we were using more than 4KiB to throw!).
Change-Id: I7e53e2fde2b39fde1910f8ee5b1712e8a66069c7
diff --git a/src/logging_android.cc b/src/logging_android.cc
index 6d949da..2c34d8a 100644
--- a/src/logging_android.cc
+++ b/src/logging_android.cc
@@ -29,14 +29,14 @@
};
LogMessage::LogMessage(const char* file, int line, LogSeverity severity, int error)
- : file_(file), line_number_(line), severity_(severity), errno_(error) {
+ : data_(new LogMessageData(line, severity, error)) {
const char* last_slash = strrchr(file, '/');
- file_ = (last_slash == NULL) ? file : last_slash + 1;
+ data_->file = (last_slash == NULL) ? file : last_slash + 1;
}
void LogMessage::LogLine(const char* line) {
- int priority = kLogSeverityToAndroidLogPriority[severity_];
- LOG_PRI(priority, LOG_TAG, "%s:%d] %s", file_, line_number_, line);
+ int priority = kLogSeverityToAndroidLogPriority[data_->severity];
+ LOG_PRI(priority, LOG_TAG, "%s:%d] %s", data_->file, data_->line_number, line);
}
} // namespace art