diff --git a/src/elf_file.cpp b/src/elf_file.cpp index 67163da6ef76288a1c99d7e18b271bdfbfda9d2c..a6a0913ee5795734f45bcae67c90b85a51a9ccd7 100644 --- a/src/elf_file.cpp +++ b/src/elf_file.cpp @@ -289,6 +289,7 @@ bool ElfFile::ParseSymNamesStr() uint64_t secOffset = shdr->fileOffset_; uint64_t secSize = shdr->secSize_; int64_t ret = lseek(fd_, secOffset, SEEK_SET); + HLOG_ASSERT(ret >= 0); char *secBuf = new (std::nothrow) char[secSize]; if (secBuf == nullptr) { HLOGE("Error in ElfFile::ParsesymNamesStr(): new failed"); diff --git a/src/perf_events.cpp b/src/perf_events.cpp index 293f1737045b6581ac0dfc386b8757f66f95a576..92ed0e5f9318356174bdf0dd5852bcbbd34761c1 100644 --- a/src/perf_events.cpp +++ b/src/perf_events.cpp @@ -1056,7 +1056,7 @@ bool PerfEvents::CreateFdEvents(void) } // update group leader if (groupFdCache[icpu][ipid] == -1) { - groupFdCache[icpu][ipid] = fd.Get(); + groupFdCache[icpu][ipid] = fdItem.fd.Get(); } } }