Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rec: Avoid overflow when computing latency
Reported by UBSan: [2020-02-28 12:21:21] pdns_recursor.cc:1841:31: runtime error: -276679 is outside the range of representable values of type 'unsigned long' [2020-02-28 12:21:21] #0 0x5610bb76af48 in startDoResolve(void*) /home/travis/build/rgacogne/pdns/pdns/recursordist/pdns-recursor-0.0.0.0.HEAD.g5d6e6b9f95.dirty/pdns_recursor.cc:1841:31 [2020-02-28 12:21:21] #1 0x5610bb7d60ac in MTasker<PacketID, std::string>::makeThread(void (*)(void*), void*)::{lambda()#1}::operator()() const /home/travis/build/rgacogne/pdns/pdns/recursordist/pdns-recursor-0.0.0.0.HEAD.g5d6e6b9f95.dirty/./mtasker.cc:284:7 [2020-02-28 12:21:21] #2 0x5610bb6bae9d in boost::function0<void>::operator()() const /usr/include/boost/function/function_template.hpp:766:14 [2020-02-28 12:21:21] #3 0x5610bb6ba21b in threadWrapper(long) /home/travis/build/rgacogne/pdns/pdns/recursordist/pdns-recursor-0.0.0.0.HEAD.g5d6e6b9f95.dirty/./mtasker_fcontext.cc:144:9 [2020-02-28 12:21:21] #4 0x7f29cb06d70d in make_fcontext (/usr/lib/x86_64-linux-gnu/libboost_context.so.1.54.0+0x70d)
- Loading branch information