graydon/rust — Issue #1267: scrutinize hash functions: << precedence often misused
Author: nikomatsakis
Created: 2011-12-07 05:43:56+00:00
State: open

I found that many hash functions in rustc follow this template:

ret foo << 16u + bar;

but by the order of precedence this yields `foo << (16u + bar)`, almost certainly not what was intended. This interacts quite poorly with our hash tables which prefer low-order bits to not be all 0. We need to search through the code and check for similar problems, then close this bug.