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

Make raw2trace more isolated #2511

Closed
s-kanev opened this issue Jul 7, 2017 · 1 comment
Closed

Make raw2trace more isolated #2511

s-kanev opened this issue Jul 7, 2017 · 1 comment

Comments

@s-kanev
Copy link
Contributor

s-kanev commented Jul 7, 2017

Right now, it aborts on error and uses global options. Fix that.

Also, it does a lot of directory walking and raw IO, which doesn't work with more exotic filesystems, where we can be storing very large traces.
Split out a self-contained library, which:

  • only takes already opened std::istream and std::ostream-compatible files and doesn't own them;
  • takes in the contents of the module file to avoid doing IO from drmodtrack_offline_read();
  • returns errors on failure;
  • doesn't depend on dr_frontend.

Also, add a frontend helper, which preserves the current behavior for local use on regular POSIX and Windows.

s-kanev added a commit to s-kanev/dynamorio that referenced this issue Jul 7, 2017
Splits out a self-contained library, which:
- only takes already opened std::istream and std::ostream-compatible files
and doesn't own them, so it can be used with more exotic filesystems;
- takes in the contents of the module file to avoid doing IO from
drmodtrack_offline_read();
- returns errors on failure;
- doesn't depend on dr_frontend.

Preserves the current behavior with raw2trace_helper_t, which walks
directories and opens files.

TESTED: ctest (failures failed before this commit as well)

Fixes DynamoRIO#2511
@derekbruening
Copy link
Contributor

Split from #2006

derekbruening pushed a commit that referenced this issue Jul 18, 2017
Splits out a self-contained library, which:
- only takes already opened std::istream and std::ostream-compatible files
and doesn't own them, so it can be used with more exotic filesystems;
- takes in the contents of the module file to avoid doing IO from
drmodtrack_offline_read();
- returns errors on failure;
- doesn't depend on dr_frontend.

Preserves the current behavior with raw2trace_helper_t, which walks
directories and opens files.

Adds a ptrace-based test checking that raw2trace doesn't open files.

TESTED: ctest

Fixes #2511
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