diff --git a/sandboxed_api/rpcchannel.cc b/sandboxed_api/rpcchannel.cc index 6081f10..07c891d 100644 --- a/sandboxed_api/rpcchannel.cc +++ b/sandboxed_api/rpcchannel.cc @@ -23,8 +23,8 @@ namespace sapi { -::sapi::Status RPCChannel::Call(const FuncCall& call, uint32_t tag, FuncRet* ret, - v::Type exp_type) { +::sapi::Status RPCChannel::Call(const FuncCall& call, uint32_t tag, + FuncRet* ret, v::Type exp_type) { absl::MutexLock lock(&mutex_); if (!comms_->SendTLV(tag, sizeof(call), reinterpret_cast(&call))) { diff --git a/sandboxed_api/sandbox2/comms_test.cc b/sandboxed_api/sandbox2/comms_test.cc index a6058c1..663abe5 100644 --- a/sandboxed_api/sandbox2/comms_test.cc +++ b/sandboxed_api/sandbox2/comms_test.cc @@ -51,9 +51,10 @@ class CommsTest : public ::testing::Test { timespec ts1, ts2; CHECK_NE(clock_gettime(CLOCK_REALTIME, &ts1), -1); CHECK_NE(clock_gettime(CLOCK_REALTIME, &ts2), -1); - snprintf(sockname_, sizeof(sockname_), "comms-test-%u-%u-%u-%u", - static_cast(ts1.tv_sec), static_cast(ts1.tv_nsec), - static_cast(ts2.tv_sec), static_cast(ts2.tv_nsec)); + snprintf( + sockname_, sizeof(sockname_), "comms-test-%u-%u-%u-%u", + static_cast(ts1.tv_sec), static_cast(ts1.tv_nsec), + static_cast(ts2.tv_sec), static_cast(ts2.tv_nsec)); LOG(INFO) << "Sockname: " << sockname_; // Comms channel using a descriptor (initialized with a file descriptor). @@ -406,8 +407,9 @@ class SenderThread { SenderThread(Comms* comms, size_t rounds) : comms_(comms), rounds_(rounds) {} void operator()() { for (size_t i = 0; i < rounds_; i++) { - ASSERT_THAT(comms_->SendBytes(reinterpret_cast("Test"), 4), - IsTrue()); + ASSERT_THAT( + comms_->SendBytes(reinterpret_cast("Test"), 4), + IsTrue()); } } diff --git a/sandboxed_api/sandbox2/docs/getting-started.md b/sandboxed_api/sandbox2/docs/getting-started.md index 82912cd..6bf6ace 100644 --- a/sandboxed_api/sandbox2/docs/getting-started.md +++ b/sandboxed_api/sandbox2/docs/getting-started.md @@ -295,7 +295,7 @@ buffer.Create(1ULL << 20); // 1 MiB s2.RunAsync(); comms->SendFD(buffer.GetFD()); auto result = s2.AwaitResult(); -uint8* buf = buffer.buffer(); // As modified by sandboxee +uint8_t* buf = buffer.buffer(); // As modified by sandboxee size_t len = buffer.size(); ``` @@ -307,7 +307,7 @@ int fd; comms.RecvFD(&fd); sandbox2::Buffer buffer; buffer.Setup(fd); -uint8 *buf = buffer.GetBuffer(); +uint8_t *buf = buffer.GetBuffer(); memset(buf, 'X', buffer.GetSize()); /* work with the buffer */ ``` diff --git a/sandboxed_api/sandbox2/unwind/unwind.cc b/sandboxed_api/sandbox2/unwind/unwind.cc index 0ffc75d..0913d44 100644 --- a/sandboxed_api/sandbox2/unwind/unwind.cc +++ b/sandboxed_api/sandbox2/unwind/unwind.cc @@ -46,6 +46,7 @@ std::string DemangleSymbol(const std::string& maybe_mangled) { } return maybe_mangled; } + std::string GetSymbolAt(const std::map& addr_to_symbol, uint64_t addr) { auto entry_for_next_symbol = addr_to_symbol.lower_bound(addr);