diff options
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/debugger.cc | 2 | ||||
| -rw-r--r-- | runtime/monitor.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/runtime/debugger.cc b/runtime/debugger.cc index f3ce552230..db268dd721 100644 --- a/runtime/debugger.cc +++ b/runtime/debugger.cc @@ -4774,7 +4774,7 @@ class StringTable { for (const std::string& str : table_) { const char* s = str.c_str(); size_t s_len = CountModifiedUtf8Chars(s); - std::unique_ptr<uint16_t> s_utf16(new uint16_t[s_len]); + std::unique_ptr<uint16_t[]> s_utf16(new uint16_t[s_len]); ConvertModifiedUtf8ToUtf16(s_utf16.get(), s); JDWP::AppendUtf16BE(bytes, s_utf16.get(), s_len); } diff --git a/runtime/monitor.h b/runtime/monitor.h index 95e4460f5d..b7245c1439 100644 --- a/runtime/monitor.h +++ b/runtime/monitor.h @@ -141,6 +141,10 @@ class Monitor { CHECK_EQ(error, 0) << strerror(error); return result; } + + void operator delete(void* ptr) { + free(ptr); + } #endif private: |