The Bug Strikes Back: LLDB Bugs Lurking for Over a Decade

The Issue One day, I was wondering how dynamic function call works. I thought I’d start with a simple puts call like in this C snippet. #include <stdio.h> int main(void) { puts("Hello\n"); } To see it going through the Procedure Linkage Table (PLT) in the context of lazy binding on x86_64 Linux LIVE, naturally, LLDB came to my mind. To my dismay, instead of something relevant to puts there were only these ugly and unidentifiable ___lldb_unnamed_symbol36 in the disaseembly on LLDB 13.0.0 🫠: In comparison, this is GDB 11.1: Let’s see how an older version of LLDB is doing. Here’s LLDB version 12.0.1 🫥: Apparently, something went wrong between the creation of LLVM version 12 and 13 release branch. It turned out that it was a patch landing in July 2021 that changed the behavior. Someone also filed a GitHub issue just a few days before I found this. I then commented my findings on the code review page of the seemingly problematic patch. ...

January 7, 2022 · 張博堯 (Po-Yao Chang)