rr-debugger / rr

Record and Replay Framework
http://rr-project.org/
Other
9.15k stars 584 forks source link

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

Open midenok opened 1 week ago

midenok commented 1 week ago

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 commented 1 week ago

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

rocallahan commented 6 days ago

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.