{"push_id":588260296,"size":25,"distinct_size":0,"ref":"refs/heads/tmp","head":"485018049ec0593fa5a486a10a7e781d6fe3a6d6","before":"0eb0ba38d0893f711e68321d3e6fe28a929cd00e","commits":[{"sha":"b137982c2f73a2488183bd80cd01a7831ad74e3e","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Avoid ICE when `FnCtxt::local_ty` cannot find type; issue error then, return `ty_err`.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/b137982c2f73a2488183bd80cd01a7831ad74e3e"},{"sha":"cbd4abfd2bc307932bf34d82a4622e01a917eb04","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Make `test/run-pass/backtrace.rs` more robust about own host environment.\n\nNamely, I have been annoyed in the past when I have done\n`RUST_BACKTRACE=1 make check` only to discover (again) that such a\ntrick causes this test to fail, because it assumes that the\n`RUST_BACKTRACE` environment variable is not set.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/cbd4abfd2bc307932bf34d82a4622e01a917eb04"},{"sha":"989d416899294600673152b68d807d784e838529","author":{"email":"9db1eb270958b3a258acf36f0c6cac890fbeca97@octayn.net","name":"Corey Richardson"},"message":"rustc: implement arithmetic overflow checking\n\nAdds overflow checking to integer addition, multiplication, and subtraction\nwhen `-Z force-overflow-checks` is true, or if `--cfg ndebug` is not passed to\nthe compiler. On overflow, it panics with `arithmetic operation overflowed`.\nAlso adds `overflowing_add`, `overflowing_sub`, and `overflowing_mul`\nintrinsics for doing unchecked arithmetic.\n\n[breaking-change]","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/989d416899294600673152b68d807d784e838529"},{"sha":"b630681b27a29caaa6895065cae8488aa049ff21","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@aatch.net","name":"James Miller"},"message":"Add `core::num::wrapping` and fix overflow errors.\n\nMany of the core rust libraries have places that rely on integer\nwrapping behaviour. These places have been altered to use the wrapping_*\nmethods:\n\n * core::hash::sip - A number of macros\n * core::str - The `maximal_suffix` method in `TwoWaySearcher`\n * rustc::util::nodemap - Implementation of FnvHash\n * rustc_back::sha2 - A number of macros and other places\n * rand::isaac - Isaac64Rng, changed to use the Wrapping helper type\n\nSome places had \"benign\" underflow. This is when underflow or overflow\noccurs, but the unspecified value is not used due to other conditions.\n\n * collections::bit::Bitv - underflow when `self.nbits` is zero.\n * collections::hash::{map,table} - Underflow when searching an empty\n   table. Did cause undefined behaviour in this case due to an\n   out-of-bounds ptr::offset based on the underflowed index. However the\n   resulting pointers would never be read from.\n * syntax::ext::deriving::encodable - Underflow when calculating the\n   index of the last field in a variant with no fields.\n\nThese cases were altered to avoid the underflow, often by moving the\nunderflowing operation to a place where underflow could not happen.\n\nThere was one case that relied on the fact that unsigned arithmetic and\ntwo's complement arithmetic are identical with wrapping semantics. This\nwas changed to use the wrapping_* methods.\n\nFinally, the calculation of variant discriminants could overflow if the\npreceeding discriminant was `U64_MAX`. The logic in `rustc::middle::ty`\nfor this was altered to avoid the overflow completely, while the\nremaining places were changed to use wrapping methods. This is because\n`rustc::middle::ty::enum_variants` now throws an error when the\ncalculated discriminant value overflows a `u64`.\n\nThis behaviour can be triggered by the following code:\n\n```\nenum Foo {\n  A = U64_MAX,\n  B\n}\n```\n\nThis commit also implements the remaining integer operators for\nWrapped<T>.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/b630681b27a29caaa6895065cae8488aa049ff21"},{"sha":"4030da6878d8aa6f1b51ba042884987a5c314d2e","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@aatch.net","name":"James Miller"},"message":"Implement parse_opt_bool better\n\nDuring my clean-up of rebase errors, I took the opportunity to implement\nparse_opt_bool so that it isn't identical to parse_bool wrapped in\n`Some`.\n\nparse_opt_bool considers no value to be true, a value of 'y', 'yes' or\n'on' to be true and 'n', 'no' or 'off' to be false. All other values are\nan error.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/4030da6878d8aa6f1b51ba042884987a5c314d2e"},{"sha":"a9a3711cd23ab621d7c5508e1245d44123af302f","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Added `OverflowingOps` trait to core::num::wrapping.\n\nThese return the result of the operation *plus* an overflow/underflow bit.\n\nThis can make it easier to write operations where you want to chain\nsome arithmetic together, but also want to return a flag signalling if\noverflow every occurred.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/a9a3711cd23ab621d7c5508e1245d44123af302f"},{"sha":"34a1bd1dcf2be113b81bcd4eb7efec7dc48b4d7b","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"fix Iter::rposition for new arith-overflow checking.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/34a1bd1dcf2be113b81bcd4eb7efec7dc48b4d7b"},{"sha":"73438fa666b25e5598f5dff26df7f4cd9b2c25c6","author":{"email":"4cc33a8ae3d9bb448f90bf63a1d4018698b1fb94@alum.mit.edu","name":"Niko Matsakis"},"message":"fix test generic-extern-mangle.rs","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/73438fa666b25e5598f5dff26df7f4cd9b2c25c6"},{"sha":"261d6ece3e008608c0b25358e0afa3e662b27947","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Fixes to collections to accommodate arith-overflow changes.\n\n* `collections::btree::node`: accommodate (transient) underflow.\n\n* `collections::btree::map`: avoid underflow during `fn next`\n  for `BTreeMap::range` methods.\n\n* `collections::slice`: note that pnkfelix deliberately used\n  `new_pos_wrapping` only once; the other cases of arithmetic do not\n  over- nor underflow, which is a useful property to leave implicitly\n  checked/documented via the remaining calls to `fn new_pos(..)`.\n\n* `collections::vec_deque` applied wrapping ops (somewhat blindly)\n  to two implementation methods, and many tests.\n\n* `std::collections::hash::table` : Use `OverflowingOps` trait to\n  track overflow during `calculate_offsets` and `calculate_allocation`\n  functions.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/261d6ece3e008608c0b25358e0afa3e662b27947"},{"sha":"797328625acaa91dc9bb6df3296fb1fd62617da2","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Fix the overflowing tests in run-fail.\n\n* The error patterns had a typo.\n\n* Our current constant evaluation would silently allow the overflow\n  (filed as Issue 22531).\n\n* The overflowing-mul test was accidentally doing addition instead of\n  multiplication.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/797328625acaa91dc9bb6df3296fb1fd62617da2"},{"sha":"b3cae49a287c3194f8544fc64019b5a8d99420fb","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Accommodate arith-overflow in `core::num`, `std::num`, `coretest::num`.\n\n * `core::num`: adjust `UnsignedInt::is_power_of_two`,\n   `UnsignedInt::next_power_of_two`, `Int::pow`.\n\n   In particular for `Int::pow`: (1.) do not panic when `base`\n   overflows if `acc` never observes the overflowed `base`, and (2.)\n   if `acc` does observe the overflowed `base`, make sure we only\n   panic if we would have otherwise (e.g. during a computation of\n   `base * base`).\n\n * also in `core::num`: avoid underflow during computation of `uint::MAX`.\n\n * `std::num`: adjust tests `uint::test_uint_from_str_overflow`,\n   `uint::test_uint_to_str_overflow`, `strconv`\n\n * `coretest::num`: adjust `test::test_int_from_str_overflow`.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/b3cae49a287c3194f8544fc64019b5a8d99420fb"},{"sha":"e6595e91b2d17c8a539da29ab935e27aee7a248b","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Accommodate arith-overflow in serialize::json numeric parsing.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/e6595e91b2d17c8a539da29ab935e27aee7a248b"},{"sha":"8b518ac78521aef6263a6898f666deb5c20b5c92","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Accommodate arith-overflow in `rand` and `std::rand`.\n\nRegarding the `rand` changes: It is unfortunate that Wrapping(T) does\nnot support the `+=` operator.  We may want to try to fix that before\n1.0 to make porting code like this palatable.\n\nRegarding `std::rand`, just arith-overflow in first example from\n`std::rand::random()` doc.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/8b518ac78521aef6263a6898f666deb5c20b5c92"},{"sha":"a97d084f33debcf145e637f09f731bc9952f3572","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"`core::iter`: fix bug uncovered by arith-overflow.\n\n(The bug was in `impl RandomAccessIterator for Rev`; it may or may not\nhave been innocuous, depending on what guarantees one has about the\nbehavior of `idx` for the underlying iterator.)","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/a97d084f33debcf145e637f09f731bc9952f3572"},{"sha":"06c0d9800fa22ad86cc7bcaaee5597a3ea72c652","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Accommodate simple cases of arith-overflow in `rustc` related crates.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/06c0d9800fa22ad86cc7bcaaee5597a3ea72c652"},{"sha":"b7d4b4e9e0a313a0a072004937db7b849bdb0e71","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Catch arith-overflow explicitly during `rustc::middle::const_eval`.\n\nThis only replaces the conditional arith-overflow asserts with\nunconditional errors from the guts of const-eval; it does *not*\nattempt to sanely handle such errors e.g. with a nice error message\nfrom `rustc`.  So the same test that led me to add this commit are\nstill failing, and must be addressed.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/b7d4b4e9e0a313a0a072004937db7b849bdb0e71"},{"sha":"f3fb76477387ede0a5f65a7d64fb3944d35a2029","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Avoid fatal errors in astconv; just err and return `ty_err` instead.\n\nThis allows computation to proceed and find further errors.\n\n(However, this is also annoying at times when the subsequent errors\nare just reporting that a ty_err occurred. I have thoughts on ways to\nfix this that I will experiment with separately.)","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/f3fb76477387ede0a5f65a7d64fb3944d35a2029"},{"sha":"83ec85f26492485a6f707c92d081c976c42d1f1d","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Address arith-overflow and error-handling in `const_eval.rs`.\n\n 1. Detect and report arithmetic overflow during const-expr eval.\n\n 2. Instead `eval_const_expr_partial` returning `Err(String)`, it now\n    has a dedicated enum of different cases. The main benefit of this\n    is the ability to pass along an interpretable payload, namely the\n    two inputs that caused an overlfow.\n\nI attempted to minimize fallout to error output in tests, but some was\nunavoidable. Those changes are in a follow-on commit.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/83ec85f26492485a6f707c92d081c976c42d1f1d"},{"sha":"345ee45b120dd572ff0479cad408eca46386941f","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Switch to `eval_const_expr_partial` when `check_match.rs` checks for `NaN`.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/345ee45b120dd572ff0479cad408eca46386941f"},{"sha":"78c714657611652a83345cfb8848c55e567edc60","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Switch to eval_const_expr_partial in `trans::consts`.\n\nHowever, I left the ICEs rather than switching to nicer error\nreporting there; these cases *should* be detected prior to hitting\ntrans, and thus ICE'ing here is appropriate.\n\n(So why switch to `eval_const_expr_partial`? Because I want to try to\neliminate all uses of `eval_const_expr` entirely.)","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/78c714657611652a83345cfb8848c55e567edc60"}]}