[Lldb-commits] [lldb] [lldb][test] Fix TestLongjmp (PR #185464)

via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 10 08:13:07 PDT 2026


eleviant wrote:

> Please include in the PR description why this fix works.
> 
> I am not sure how it ever worked. The comment sounds like it should always jump, but the code would never have been jumping. Maybe there are times where `(bool)clock()` truncates to zero?

I also don't think it ever worked, because if(clock()) doesn't truncate the return value bool, but rather checks for zero result. Technically there *is* a probabiilty that this program is executed too fast (user and system times are both 0) or too slow (~72 minutes) for counter to overflow, but I think it's extremely low

https://github.com/llvm/llvm-project/pull/185464


More information about the lldb-commits mailing list