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

dlclose() causes .so unloaded and does not reload it back on reverse-continue #3846

Open
midenok opened this issue Oct 9, 2024 · 3 comments

Comments

@midenok
Copy link

midenok commented Oct 9, 2024

In continuation of #3845.

For the trace of the following sequence:

  1. dlopen(X.so)
  2. debugged code
  3. dlclose(X.so)
  4. After dlclose()

Until 4. is reached 2. displays X.so in info shared. But if 4. is reached in trace replay, reverse-continue to 2. does not return back X.so to loaded modules.

The workaround to this is restart from the start or replay dlopen() again. Saved checkpoints also restore correct modules list.

@khuey
Copy link
Collaborator

khuey commented Oct 9, 2024

@rocallahan this is a known gdb issue isn't it?

@rocallahan
Copy link
Collaborator

Yes it is. When GDB observes the dlclose call it doesn't consider whethr execution is going forward or backward. @midenok it would be great if you can file a GDB bug about this.

@GitMensch
Copy link
Contributor

The GDB bug report seems to be missing: https://sourceware.org/bugzilla/buglist.cgi?product=gdb&quicksearch=dlclose

Note: there's also a related bug to dlopen, also not reported yet: https://sourceware.org/bugzilla/buglist.cgi?product=gdb&quicksearch=dlopen, recognizable if you reverse-step over that, then step-over it again; those may be reported as a single bug.

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

No branches or pull requests

4 participants