Skip to content

Commit

Permalink
pt/addrtrace: Exit if no log_addr, except phase 1
Browse files Browse the repository at this point in the history
For any accessed virtual address, DATA tries to resolve the matching
logical address. There seems to be a general memory range that is not
mapped to any image, but used generally.

DATA allows such an event to occur in phase 1, but will fail if it
occurs in any other phase. Experiments have shown that these accessed
addresses do not differ between different runs.
  • Loading branch information
aewag committed Mar 7, 2023
1 parent fc9926b commit 2ff2410
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pintool/addrtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ using namespace std;

int DEBUG_LEVEL;
int SYSCALL_NUMBER = -1;
bool PHASE_1 = true;

/***********************************************************************/

Expand Down Expand Up @@ -1078,10 +1079,7 @@ void *getLogicalAddress(void *virt_addr, void *ip) {
}

PT_WARN("not found addr " << std::hex << (uint64_t)virt_addr);
// TODO
// PT_ASSERT(fast_recording == false,
// "virt_addr was not found despite being in fast_recording
// mode");
PT_ASSERT(PHASE_1, "virt_addr was not found despite being not in phase 1");
DEBUG(3) printHeap();
DEBUG(4) printProcMap();
return virt_addr;
Expand Down Expand Up @@ -2470,6 +2468,7 @@ int main(int argc, char *argv[]) {
PIN_InitSymbols();

DEBUG_LEVEL = KnobDebug.Value();
PHASE_1 = KnobLeaks.Value() == false;
StopTrace = KnobStopTrace.Value();

if (KnobLeaks.Value() && KnobCallstack.Value()) {
Expand Down

0 comments on commit 2ff2410

Please sign in to comment.