Skip to content

Errors building libdft-dta #8

@huang-zhen

Description

@huang-zhen

Hi,

I encountered several compilation errors when building libdft-dta, while track, nullpin, libdft were built without any errors. I used pin-3.7-97619-g0d0c92f4f-gcc-linux, which was downloaded using the install_pin.sh script, on Ubuntu 16.04. Below are the error messages. Can you please take a look? Thank you.

libdft-dta.cpp: In function ‘void alert(ADDRINT, ADDRINT)’:
libdft-dta.cpp:116:25: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘ADDRINT {aka long unsigned int}’ [-Werror=format=]
getpid(), ins, bt);
^
libdft-dta.cpp:116:25: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘ADDRINT {aka long unsigned int}’ [-Werror=format=]
libdft-dta.cpp: In function ‘ADDRINT assert_reg32(thread_ctx_t*, uint32_t, uint32_t)’:
libdft-dta.cpp:151:53: error: ‘tagmap_getl’ was not declared in this scope
return thread_ctx->vcpu.gpr[reg] | tagmap_getl(addr);
^
libdft-dta.cpp: In function ‘ADDRINT assert_reg16(thread_ctx_t*, uint32_t, uint32_t)’:
libdft-dta.cpp:171:38: error: ‘VCPU_MASK16’ was not declared in this scope
return (thread_ctx->vcpu.gpr[reg] & VCPU_MASK16)
^
libdft-dta.cpp:172:21: error: ‘tagmap_getw’ was not declared in this scope
| tagmap_getw(addr);
^
libdft-dta.cpp: In function ‘ADDRINT assert_mem32(ADDRINT, ADDRINT)’:
libdft-dta.cpp:188:26: error: ‘tagmap_getl’ was not declared in this scope
return tagmap_getl(paddr) | tagmap_getl(taddr);
^
libdft-dta.cpp: In function ‘ADDRINT assert_mem16(ADDRINT, ADDRINT)’:
libdft-dta.cpp:204:26: error: ‘tagmap_getw’ was not declared in this scope
return tagmap_getw(paddr) | tagmap_getw(taddr);
^
libdft-dta.cpp: In function ‘void dta_instrument_jmp_call(LEVEL_CORE::INS)’:
libdft-dta.cpp:245:33: error: ‘REG32_INDX’ was not declared in this scope
IARG_UINT32, REG32_INDX(reg),
^
libdft-dta.cpp:259:33: error: ‘REG16_INDX’ was not declared in this scope
IARG_UINT32, REG16_INDX(reg),
^
libdft-dta.cpp: In function ‘void post_read_hook(syscall_ctx_t*)’:
libdft-dta.cpp:373:62: error: ‘tagmap_setn’ was not declared in this scope
tagmap_setn(ctx->arg[SYSCALL_ARG1], (size_t)ctx->ret);
^
libdft-dta.cpp: In function ‘void post_readv_hook(syscall_ctx_t*)’:
libdft-dta.cpp:415:60: error: ‘tagmap_setn’ was not declared in this scope
tagmap_setn((size_t)iov->iov_base, iov_tot);
^
libdft-dta.cpp: In function ‘void post_socketcall_hook(syscall_ctx_t*)’:
libdft-dta.cpp:474:8: error: ‘SYS_ACCEPT’ was not declared in this scope
case SYS_ACCEPT:
^
libdft-dta.cpp:475:8: error: ‘SYS_ACCEPT4’ was not declared in this scope
case SYS_ACCEPT4:
^
libdft-dta.cpp:488:8: error: ‘SYS_GETSOCKNAME’ was not declared in this scope
case SYS_GETSOCKNAME:
^
libdft-dta.cpp:489:8: error: ‘SYS_GETPEERNAME’ was not declared in this scope
case SYS_GETPEERNAME:
^
libdft-dta.cpp:504:8: error: ‘SYS_SOCKETPAIR’ was not declared in this scope
case SYS_SOCKETPAIR:
^
libdft-dta.cpp:512:8: error: ‘SYS_RECV’ was not declared in this scope
case SYS_RECV:
^
libdft-dta.cpp:521:24: error: ‘tagmap_setn’ was not declared in this scope
(size_t)ctx->ret);
^
libdft-dta.cpp:527:8: error: ‘SYS_RECVFROM’ was not declared in this scope
case SYS_RECVFROM:
^
libdft-dta.cpp:536:23: error: ‘tagmap_setn’ was not declared in this scope
(size_t)ctx->ret);
^
libdft-dta.cpp:552:8: error: ‘SYS_GETSOCKOPT’ was not declared in this scope
case SYS_GETSOCKOPT:
^
libdft-dta.cpp:564:8: error: ‘SYS_RECVMSG’ was not declared in this scope
case SYS_RECVMSG:
^
libdft-dta.cpp:592:26: error: ‘tagmap_setn’ was not declared in this scope
msg->msg_controllen);
^
libdft-dta.cpp:623:16: error: ‘tagmap_setn’ was not declared in this scope
iov_tot);
^
libdft-dta.cpp: In function ‘int main(int, char**)’:
libdft-dta.cpp:773:65: error: invalid conversion from ‘void ()(syscall_ctx_t)’ to ‘void ()(LEVEL_VM::THREADID, syscall_ctx_t) {aka void ()(unsigned int, syscall_ctx_t)}’ [-fpermissive]
(void)syscall_set_post(&syscall_desc[__NR_read], post_read_hook);
^
In file included from libdft-dta.cpp:51:0:
/home/user/code/libdft64/src/syscall_desc.h:21:5: note: initializing argument 2 of ‘int syscall_set_post(syscall_desc_t*, void ()(LEVEL_VM::THREADID, syscall_ctx_t))’
int syscall_set_post(syscall_desc_t , void ()(THREADID, syscall_ctx_t ));
^
libdft-dta.cpp:776:67: error: invalid conversion from ‘void (
)(syscall_ctx_t*)’ to ‘void ()(LEVEL_VM::THREADID, syscall_ctx_t) {aka void ()(unsigned int, syscall_ctx_t)}’ [-fpermissive]
(void)syscall_set_post(&syscall_desc[__NR_readv], post_readv_hook);
^
In file included from libdft-dta.cpp:51:0:
/home/user/code/libdft64/src/syscall_desc.h:21:5: note: initializing argument 2 of ‘int syscall_set_post(syscall_desc_t*, void ()(LEVEL_VM::THREADID, syscall_ctx_t))’
int syscall_set_post(syscall_desc_t , void ()(THREADID, syscall_ctx_t ));
^
libdft-dta.cpp:780:40: error: ‘__NR_socketcall’ was not declared in this scope
(void)syscall_set_post(&syscall_desc[__NR_socketcall],
^
libdft-dta.cpp:784:63: error: invalid conversion from ‘void (
)(syscall_ctx_t*)’ to ‘void ()(LEVEL_VM::THREADID, syscall_ctx_t) {aka void ()(unsigned int, syscall_ctx_t)}’ [-fpermissive]
(void)syscall_set_post(&syscall_desc[__NR_dup], post_dup_hook);
^
In file included from libdft-dta.cpp:51:0:
/home/user/code/libdft64/src/syscall_desc.h:21:5: note: initializing argument 2 of ‘int syscall_set_post(syscall_desc_t*, void ()(LEVEL_VM::THREADID, syscall_ctx_t))’
int syscall_set_post(syscall_desc_t , void ()(THREADID, syscall_ctx_t ));
^
libdft-dta.cpp:785:64: error: invalid conversion from ‘void (
)(syscall_ctx_t*)’ to ‘void ()(LEVEL_VM::THREADID, syscall_ctx_t) {aka void ()(unsigned int, syscall_ctx_t)}’ [-fpermissive]
(void)syscall_set_post(&syscall_desc[__NR_dup2], post_dup_hook);
^
In file included from libdft-dta.cpp:51:0:
/home/user/code/libdft64/src/syscall_desc.h:21:5: note: initializing argument 2 of ‘int syscall_set_post(syscall_desc_t*, void ()(LEVEL_VM::THREADID, syscall_ctx_t))’
int syscall_set_post(syscall_desc_t , void ()(THREADID, syscall_ctx_t ));
^
libdft-dta.cpp:788:67: error: invalid conversion from ‘void (
)(syscall_ctx_t*)’ to ‘void ()(LEVEL_VM::THREADID, syscall_ctx_t) {aka void ()(unsigned int, syscall_ctx_t)}’ [-fpermissive]
(void)syscall_set_post(&syscall_desc[__NR_close], post_close_hook);
^
In file included from libdft-dta.cpp:51:0:
/home/user/code/libdft64/src/syscall_desc.h:21:5: note: initializing argument 2 of ‘int syscall_set_post(syscall_desc_t*, void ()(LEVEL_VM::THREADID, syscall_ctx_t))’
int syscall_set_post(syscall_desc_t , void ()(THREADID, syscall_ctx_t ));
^
libdft-dta.cpp:793:19: error: invalid conversion from ‘void (
)(syscall_ctx_t*)’ to ‘void ()(LEVEL_VM::THREADID, syscall_ctx_t) {aka void ()(unsigned int, syscall_ctx_t)}’ [-fpermissive]
post_open_hook);
^
In file included from libdft-dta.cpp:51:0:
/home/user/code/libdft64/src/syscall_desc.h:21:5: note: initializing argument 2 of ‘int syscall_set_post(syscall_desc_t*, void ()(LEVEL_VM::THREADID, syscall_ctx_t))’
int syscall_set_post(syscall_desc_t , void ()(THREADID, syscall_ctx_t ));
^
libdft-dta.cpp:795:19: error: invalid conversion from ‘void (
)(syscall_ctx_t*)’ to ‘void ()(LEVEL_VM::THREADID, syscall_ctx_t) {aka void ()(unsigned int, syscall_ctx_t)}’ [-fpermissive]
post_open_hook);
^
In file included from libdft-dta.cpp:51:0:
/home/user/code/libdft64/src/syscall_desc.h:21:5: note: initializing argument 2 of ‘int syscall_set_post(syscall_desc_t*, void ()(LEVEL_VM::THREADID, syscall_ctx_t))’
int syscall_set_post(syscall_desc_t , void ()(THREADID, syscall_ctx_t *));
^
cc1plus: all warnings being treated as errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions