masaori335 commented on PR #13119: URL: https://github.com/apache/trafficserver/pull/13119#issuecomment-4331737226
This `strcasecmp` in the loop calls our `strcasecmp(const std::string_view &lhs, const std::string_view &rhs)` in the libswoc, which is inlined. The problem is that this `strcasecmp` almost always call libc's `::strncasecmp`, because the size comparison inside the function is only done to determine the `size_t n` passed as the 3rd argument. ( I thought the size comparison does return in the beginning, but it doesn't ) https://github.com/apache/trafficserver/blob/a26a2d84595c1038a4061d4a7f4a2c4f55178d81/lib/swoc/src/string_view_util.cc#L29-L47 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
