Closed Bug 589714 Opened 11 years ago Closed 11 years ago
JM: Some math operations don't load from backing stores
Reduced test case is in the patch, and is most of the failures on the Stanford Crypto Library test suite. The bug is in the integer overflow path for ADD, SUB, and MUL. Sometimes the result register overlaps with an input data register. To rematerialize the input, a load is required. However it used frame.addressOf(), which really must be used with extreme care when loads are involved. It will return the raw address of a copy, rather than following the copy to its backing store. The copy was not synced, so it was reading garbage. This affected a few other uses of addressOf() as well. The attached patch introduces a version that follows copies and asserts a sync()'d state.
SJCL tests pass with this.
Comment on attachment 468328 [details] [diff] [review] fix v2, correct patch Thanks for the excellent explanation of the cause and the workings of the fix!
Attachment #468328 - Flags: review?(dmandelin) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.