h2o / picohttpparser

tiny HTTP parser written in C (used in HTTP::Parser::XS et al.)
1.83k stars 246 forks source link

Workaround 5.0 asan findings #44

Closed deweerdt closed 5 years ago

deweerdt commented 6 years ago

Make 16 the arrays explicitly 16 bytes large so that reads exceeding them aren't flag as out of bounds reads

deweerdt commented 6 years ago

I don't believe it's necessary to pull the change, but i figured that i would at least document the fact that ASAN reports out-of-bounds reads on range2 and range1 because while there's technically valid memory after the variable, this is still a read after the variable in question.

kazuho commented 5 years ago

Thanks for the PR. I think we have a theoretical possibility of seeing SEGV due to ALIGN(16) being absent for ranges1, though in practice people would be noticing the issue in such case because parsing would never succeed in such case.

Hence merged with cc4df34e being added.