Susan Hinrichs created TS-4820: ---------------------------------- Summary: ParseRules::ink_tolower_buffer seems to be broken Key: TS-4820 URL: https://issues.apache.org/jira/browse/TS-4820 Project: Traffic Server Issue Type: Bug Reporter: Susan Hinrichs
This function doesn't seem to be used. It tries to be clever about unrolling the character copy loop to do word aligned assignments. However, its calculation about the number of characters to assign to get the pointer to be word aligned is wrong (fpad). The assignment in the code is {code} uintptr_t fpad = 4 - ((uintptr_t)ptr & 3); {code} I think it should be {code} uintptr_t fpad = ((uintptr_t)ptr & 3); {code} I tried using this function while addressing the lower case cert name lookup bug, but it didn't work. It only copied the first 8 of 14 characters. I grepped the code base and it seems that this function is not used anywhere. I would suggest just removing the ink_tolower_buffer function. I think compilers are clever enough these days to do the unrolling if it makes sense. -- This message was sent by Atlassian JIRA (v6.3.4#6332)