提交 fe3d596f 编写于 作者: C coleenp

8037076: Check constant pool constants

Summary: Fix events log string.
Reviewed-by: kvn, mschoene
上级 07ee36d0
/* /*
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -82,7 +82,7 @@ EventMark::EventMark(const char* format, ...) { ...@@ -82,7 +82,7 @@ EventMark::EventMark(const char* format, ...) {
va_start(ap, format); va_start(ap, format);
// Save a copy of begin message and log it. // Save a copy of begin message and log it.
_buffer.printv(format, ap); _buffer.printv(format, ap);
Events::log(NULL, _buffer); Events::log(NULL, "%s", (const char*)_buffer);
va_end(ap); va_end(ap);
} }
} }
...@@ -91,6 +91,6 @@ EventMark::~EventMark() { ...@@ -91,6 +91,6 @@ EventMark::~EventMark() {
if (LogEvents) { if (LogEvents) {
// Append " done" to the begin message and log it // Append " done" to the begin message and log it
_buffer.append(" done"); _buffer.append(" done");
Events::log(NULL, _buffer); Events::log(NULL, "%s", (const char*)_buffer);
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册