Skip to content
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

Using different tags instead of FDOFFSET. #3

Open
vivek425ster opened this issue Feb 25, 2016 · 9 comments
Open

Using different tags instead of FDOFFSET. #3

vivek425ster opened this issue Feb 25, 2016 · 9 comments
Milestone

Comments

@vivek425ster
Copy link
Contributor

How to use different type of tags instead of FDOFFSET which is defined in libdft/src/config.h
When I am trying to use other tags such as UINT8, UINT32SET by changing the makefile.rules line
TOOL_CXXFLAGS += $(LOGGING_FLAGS) -DCUSTOM_TAGS_FDOFFSET -std=c++11 -I$(LIBDFT_PATH) -I./include
to -DCUSTOM_TAGS_UINT8 or any other tag name
and similar change in makefile.libdft in support directory.
When i am again doing make. I am getting errors in dtracker.H files in PROVLOG inline functions.

@m000
Copy link
Owner

m000 commented Feb 25, 2016

Currently this isn't supported in the master branch. You may want to check the bitset branch, where I have refactored a lot of stuff to make this easier. You will have to reimplement the syscall hooks for the tag type you want to use.
Pull requests that add support for new tag types are welcome.

@m000 m000 added this to the v0.5 milestone Feb 25, 2016
@vivek425ster
Copy link
Contributor Author

@m000
I am trying to add another tag type which is based on efficient representation of sparse bitvectors.http://bmagic.sourceforge.net/.
You can find the code changes here: bitset...vivek425ster:bitset
And i have also changed tag_traits.cpp and tag_traits.h file accordingly in the libdft.Here are the contents of the file https://gist.github.com/vivek425ster/5b1aa2446e6ba0b17a19
I am getting following error during runtime
E:Unable to load /home/vivek/libdft/bitset_new/dtracker/./obj-ia32/dtracker.so: /home/vivek/libdft/bitset_new/dtracker/./obj-ia32/dtracker.so: undefined symbol: _Z20tagmap_setb_with_tagjRKN2bm7bvectorINS_9mem_allocINS_15block_allocatorENS_13ptr_allocatorEEEEE

Can you please help me in resolving this error.
Thanks

@vivek425ster
Copy link
Contributor Author

I resolved the previous error. I wasn't doing make clean for libdft.
Now the program is always throwing segmentation fault after the end of 1st basic block i.e after call <memory address> instruction. It correctly works for the Bitset Tag. But throws segmentation fault for bvector tag which i have defined. Even when i removed the case of call near in ins_inspect function so that it goes into the default switch case, it is throwing segmentation fault. I am unable to understand how the tag is affecting the program.

The code changes are bitset...vivek425ster:bitset
and the file tag_traits.cpp and tag_traits.h are https://gist.github.com/vivek425ster/5b1aa2446e6ba0b17a19

Can you please help in resolving the error.
Thanks

@m000
Copy link
Owner

m000 commented Mar 4, 2016

Could you post a stack trace on pastebin?

2016-03-04 16:41 GMT+01:00 vivek425ster [email protected]:

I resolved the previous error. I wasn't doing make clean for libdft.
Now the program is always throwing segmentation fault after the end of 1st
basic block i.e after call instruction. It correctly
works for the Bitset Tag. But throws segmentation fault for bvector tag
which i have defined. Even when i removed the case of call near in
ins_inspect function so that it goes into the default switch case, it is
throwing segmentation fault. I am unable to understand how the tag is
affecting the program.

The code changes are bitset...vivek425ster:bitset
bitset...vivek425ster:bitset
and the file tag_traits.cpp and tag_traits.h are
https://gist.github.com/vivek425ster/5b1aa2446e6ba0b17a19

Can you please help in resolving the error.
Thanks


Reply to this email directly or view it on GitHub
#3 (comment).

@vivek425ster
Copy link
Contributor Author

@m000
I have used gdb backtrace to generate the stack trace
It gives me following
#0 0x8002a3f3 in std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) [clone .part.2] ()
and the pintool.log file is
Pin 2.13 kit 62728 mov eax, esp call 0xb77237c0
I have logged the instructions which are getting executed.

@m000
Copy link
Owner

m000 commented Mar 5, 2016

Is that all of the stack trace? Because this one line seems only related to
the C++ streams library.

2016-03-05 18:45 GMT+01:00 vivek425ster [email protected]:

@m000 https://github.com/m000
I have used gdb backtrace to generate the stack trace
It gives me following
#0 0x8002a3f3 in std::basic_ostream<char, std::char_traits >&
std::operator<< std::char_traits(std::basic_ostream<char,
std::char_traits >&, char const*) clone .part.2

and the pintool.log file is
Pin 2.13 kit 62728
mov eax, esp
call 0xb77237c0

I have logged the instructions which are getting executed.


Reply to this email directly or view it on GitHub
#3 (comment).

@vivek425ster
Copy link
Contributor Author

Yes, this is the only thing it is showing.
Are there any other methods to generate the stack trace?

On Saturday, March 5, 2016, Manolis Stamatogiannakis <
[email protected]> wrote:

Is that all of the stack trace? Because this one line seems only related to
the C++ streams library.

2016-03-05 18:45 GMT+01:00 vivek425ster <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');>:

@m000 https://github.com/m000
I have used gdb backtrace to generate the stack trace
It gives me following
#0 0x8002a3f3 in std::basic_ostream<char, std::char_traits >&
std::operator<< std::char_traits(std::basic_ostream<char,
std::char_traits >&, char const*) clone .part.2

and the pintool.log file is
Pin 2.13 kit 62728
mov eax, esp
call 0xb77237c0

I have logged the instructions which are getting executed.


Reply to this email directly or view it on GitHub
#3 (comment).


Reply to this email directly or view it on GitHub
#3 (comment).

@m000
Copy link
Owner

m000 commented Mar 6, 2016

I doubt this is all. The displayed stack frame corresponds to the "<<"
operator of an output stream. This must have happened in some context. You
can't have this on top-level.

Try compiling everything with the "-g" flag and enable core dumps, or start
your program from within gdb.

2016-03-06 6:11 GMT+01:00 vivek425ster [email protected]:

Yes, this is the only thing it is showing.
Are there any other methods to generate the stack trace?

On Saturday, March 5, 2016, Manolis Stamatogiannakis <
[email protected]> wrote:

Is that all of the stack trace? Because this one line seems only related
to
the C++ streams library.

2016-03-05 18:45 GMT+01:00 vivek425ster <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');>:

@m000 https://github.com/m000
I have used gdb backtrace to generate the stack trace
It gives me following
#0 0x8002a3f3 in std::basic_ostream<char, std::char_traits >&
std::operator<< std::char_traits(std::basic_ostream<char,
std::char_traits >&, char const*) clone .part.2

and the pintool.log file is
Pin 2.13 kit 62728
mov eax, esp
call 0xb77237c0

I have logged the instructions which are getting executed.


Reply to this email directly or view it on GitHub
#3 (comment).


Reply to this email directly or view it on GitHub
#3 (comment).


Reply to this email directly or view it on GitHub
#3 (comment).

@vivek425ster
Copy link
Contributor Author

http://pastebin.com/pX8nwJBt
This is the stack trace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants