[spam][crazy][log] gdb, thread local, libgit, instruction pointet

Undiscussed Groomed for Male Slavery, One Victim of Many gmkarl at gmail.com
Sat Aug 6 21:32:38 PDT 2022

so while valgrind finds that the error is my mind, not my system, i'll
paste some scrollback in ....

here's where i identified that the hang was within the remote_name()
function. i set a breakpoint within it and restarted execution:

410                 auto remote_name =
Program received signal SIGINT, Interrupt.
0x00007ffff7bc2292 in ?? ()
(gdb) break 81
Breakpoint 5 at 0x55555555a9a4: file process2.cpp, line 81.
(gdb) disable 4
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program:
warning: Probes-based dynamic linker interface failed.
Reverting to original interface.
Loading commits for ../repos/Rust
commit: a3632327e441c5975f2e40ca794111c87de80d8a

Breakpoint 3, main (argc=2, argv=0x7fffffffe2e8) at process2.cpp:761
761                     if (outputter.process(max_diffs_per_commit)) {
(gdb) disable 3
(gdb) cont
looping over diff: a3632327e441c5975f2e40ca794111c87de80d8a

Breakpoint 5, repo_commits::remote_name[abi:cxx11](cppgit2::oid
const&) (this=0x5555555ac478, commit=...) at process2.cpp:81
81              static thread_local std::vector<cppgit2::oid>

here i held "n" for a while to watch the loop continue. it was finding
commits that didn't match its condition on line 90, so it just loop
for a bit, and I set a breakpoint on line 91 to drill down:

(gdb) list
80          {
81              static thread_local std::vector<cppgit2::oid>
82              non_remote_references.clear();
83              for (
84                  reference_iter.init(repository);
85                  reference_iter;
86                  ++ reference_iter
87              ) {
88                  auto branch = *reference_iter;
89                  auto branch_tip = branch.resolve().target();
(gdb) list
90                  if (branch_tip == commit ||
repository.is_descendant_of(branch_tip, commit)) {
91                      static thread_local std::string branch_name;
92                      branch_name = branch.name();
93                      try {
94                          return
95                      } catch (cppgit2::git_exception &) {
97                      }
98                  }
99              }
(gdb) break 91
Breakpoint 6 at 0x55555555ab10: file process2.cpp, line 91.
(gdb) cont

More information about the cypherpunks mailing list