-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors building libdft-dta #8
Comments
Hi, I also met this problem. |
Hello, I have encountered the problem of missing #include header files in make tools (libdft-dta, track, nullpin, libdft). Did you encounter this problem when you successfully compiled track, nullpin, and libdft? Thank you for you time. |
I also have this issue. libdft-dta does not build on my machine (Ubuntu 20.04) or in the specified Docker image. All other tools compile just fine. |
sorry, I have pin to 3.20 and test and can't reproduce your issue.. |
same error, with pin 3.20 |
Would you provide your environment in detailed? |
Well, it seem's that the support for libdft-dta has not yet been added. I tried to search for some functions appearing in the error message and got this: As you can see, there is no such a function. But this function does exist in the original implementation. While libdft64 is using an optimized tagmap representation, maybe the related code should be rewrote. Thank you. |
@M4tsuri Sorry that I have not noticed
|
@spinpx Ok, I'll try to work on it. Thank you. |
@spinpx By the way, I've tried the example program Lines 8 to 13 in e20f602
But it's improperly applied on a uint16 value, which leads to unexpected behavior. Lines 52 to 53 in e20f602
If this is intended, I think it would be better to comment it out, or use a |
@M4tsuri You are right, Finally , feel free to contribute your code. 👍 |
Hello everyone, I am a beginner at libdft. I am very interested in binary analysis, and I currently studying in this field. #The makefile output: `root@localhost: cd tools && TARGET=intel64 CPPFLAGS= DFTFLAGS= make |
Yes , they are the same, you can use
Please check them in
|
@spinpx hello,spinpx. I end up finding out this command when I run makefile in libdft64. The .cpp files in libdft64/src/ ends up link into libdft.a. I want to find out what is file for? |
By the way, I found that the llibdft.a is the relocate file. it just combines the .o files in src, and does nothing! Why is that? |
The archive is used for static linking with the code in tools. |
But I can't see the libdft.a link with any other .o files |
Hello, everyone. Does someone knows this error when you run the libdft-dta? |
Hi I also get the same issue with @xubenji
|
There are a lot of versions of libdft-dta. I may use the very old one that raised this error. It's been a while since I ran this file. a lot of detail that I have forget. |
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
The text was updated successfully, but these errors were encountered: