Skip to content

Commit

Permalink
fix(test/libsinsp_e2e): fix load of misaligned address
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <[email protected]>
  • Loading branch information
therealbobo committed Jul 13, 2024
1 parent 29d6c69 commit 28a5ad5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/libsinsp_e2e/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,8 +865,7 @@ TEST_F(sys_call_test, procinfo_processchild_cpuload)
uint64_t tcpu;

const sinsp_evt_param* parinfo = e->get_param(0);
//tcpu = *(uint64_t*)parinfo->m_val;
memcpy(&tcpu,parinfo->m_val, sizeof(uint64_t));
memcpy(&tcpu, parinfo->m_val, sizeof(uint64_t));

uint64_t delta = tcpu - lastcpu;

Expand Down Expand Up @@ -947,7 +946,7 @@ TEST_F(sys_call_test, procinfo_two_processchilds_cpuload)
uint64_t tcpu;

const sinsp_evt_param* parinfo = e->get_param(0);
tcpu = *(uint64_t*)parinfo->m_val;
memcpy(&tcpu, parinfo->m_val, sizeof(uint64_t));

uint64_t delta = tcpu - lastcpu;

Expand All @@ -966,7 +965,7 @@ TEST_F(sys_call_test, procinfo_two_processchilds_cpuload)
uint64_t tcpu;

const sinsp_evt_param* parinfo = e->get_param(0);
tcpu = *(uint64_t*)parinfo->m_val;
memcpy(&tcpu, parinfo->m_val, sizeof(uint64_t));

uint64_t delta = tcpu - lastcpu1;

Expand Down

0 comments on commit 28a5ad5

Please sign in to comment.