Enabling Effective Error Mitigation In Memory Chips That Use On-Die Error-Correcting Codes