Open adam-singer opened 12 years ago
Are these bugs contained to shifting operations on BigNum or are they also apparent when doing ordinary math with bignums (which also internally rely on shifting) ?
I think its only when shifting numbers that are negative the object fails. Internally none of numbers in the internal data structure should be negative, so all computations should be safe. I noticed this issue when dealing with negative numbers and put a safe guard in for checking a shift on negative carry http://goo.gl/Ayjnv . While I dont like this solution at the moment, it seems to work.
google group discussion started on this https://groups.google.com/a/dartlang.org/d/topic/misc/3olrB-Fkd5U/discussion
dart2js does not carry the signed bit when code is compiled to javascript that uses the shift operators << >> . This leads to bugs with the way bit shifting is implemented with native dart int.