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

WIP: quick hack demo of gotcha (do not merge) #701

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

carns
Copy link
Contributor

@carns carns commented Mar 29, 2022

Just opening this PR to track the example. DO NOT MERGE.

This commit is a quick and dirty hack to illustrate how gotcha might be used for Darshan instrumentation. It disables the existing H5Fcreate() wrapper and replaces it with a hardcoded wrapper in darshan-core.c loaded using gotcha from within the darshan initialization function. The hardcoded wrapper just prints a "hello world" message. The purpose is to illustrate the potential for wrapping symbols that appear after the darshan library in the runtime link order.

A quick and dirty example of running it with the ph5example test program is included in the darshan-runtime/gotcha-demo-test-case directory.

This example does not work. The gotcha wrapper loading appears to work ok, but then subsequent calls with the existing wrappers (specifically wrappers for printf() ) produce a segfault with the pc set to the zero page.

Possibly a bug, or possibly a bad interaction between gotcha and the dlsym calls made by existing Darshan wrappers.

- getting segv on printf calls after gotcha registration in this
  iteration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant