Carl Friedrich Bolz-Tereick pushed to branch branch/default at PyPy / pypy
Commits: cba4ba4f by Carl Friedrich Bolz-Tereick at 2022-10-15T14:28:30+02:00 (cfbolz, NiRit100 around): #3832 be more careful in handling bound addition/subtraction in the presence of overflows --HG-- branch : fix-intutils-ovf-bug - - - - - 350a1e9c by Carl Friedrich Bolz-Tereick at 2022-10-15T15:24:27+02:00 int_neg also has a bug also add some consistency checks between the methods --HG-- branch : fix-intutils-ovf-bug - - - - - ca0788f3 by Carl Friedrich Bolz-Tereick at 2022-10-15T19:02:42+02:00 get rid of has_upper and has_lower completely Their meaning was basically never super obvious, and you need to be careful to understand it correctly everywhere. Instead, we now have: - methods that check whether overflow is known to not occur for certain operations (add/sub/.._bound_cannot_overflow) - the default add/sub/mul/..._bound methods will return result bounds that are correct whether overflow happens or not. - for int_add_ovf/guard_no_overflow there is another new method on the bounds, add_bound_no_overflow that returns the tighter range that applies if we know from the guard that overflow has not occurred. --HG-- branch : fix-intutils-ovf-bug - - - - - 92e91d51 by Carl Friedrich Bolz-Tereick at 2022-10-15T19:41:08+02:00 another incorrect test, about int_neg: the following implication is wrong in the presence of overflow: -x <= 0 ⇒ x >= 0 with the (only) counterexample of x = MININT the inverse one holds: -x >= 0 ⇒ x <= 0 in practice, int_neg is mostly preceded by int_eq(x, MINIT), guard_false, so make things work in that case --HG-- branch : fix-intutils-ovf-bug - - - - - fe37c69e by Carl Friedrich Bolz-Tereick at 2022-10-15T22:04:30+02:00 add a new file with test_optimize*-style tests but specifically for those cases that relate to intbounds (the other ones are getting way too huge) --HG-- branch : fix-intutils-ovf-bug - - - - - e11116e6 by Carl Friedrich Bolz-Tereick at 2022-10-17T13:37:01+02:00 add some somewhat experimental code that uses the Z3 SMT solver to check that the optimizer produces a valid output. only works for a small amount of integer operations so far --HG-- branch : fix-intutils-ovf-bug - - - - - 71a68c2b by Carl Friedrich Bolz-Tereick at 2022-10-17T20:36:49+02:00 put widening logic into one spot --HG-- branch : fix-intutils-ovf-bug - - - - - be5ab5e7 by Carl Friedrich Bolz-Tereick at 2022-10-17T20:54:27+02:00 support of int_add_ovf, guard_no_overflow --HG-- branch : fix-intutils-ovf-bug - - - - - b19b73e8 by Carl Friedrich Bolz-Tereick at 2022-10-17T22:48:05+02:00 move int tests into a file and support them in z3 --HG-- branch : fix-intutils-ovf-bug - - - - - b2a468a0 by Carl Friedrich Bolz-Tereick at 2022-10-18T10:32:42+02:00 support for signext --HG-- branch : fix-intutils-ovf-bug - - - - - 67010878 by Carl Friedrich Bolz-Tereick at 2022-10-18T10:39:38+02:00 test and fix: known_ge_const was unused, untested, and thus broken --HG-- branch : fix-intutils-ovf-bug - - - - - cb49de15 by Carl Friedrich Bolz-Tereick at 2022-10-18T12:28:44+02:00 support for uint_mul_high --HG-- branch : fix-intutils-ovf-bug - - - - - fdaa1225 by Carl Friedrich Bolz-Tereick at 2022-10-18T12:29:53+02:00 start randomly generating traces, optimizing them, and checking with z3 --HG-- branch : fix-intutils-ovf-bug - - - - - 83b9b414 by Carl Friedrich Bolz-Tereick at 2022-10-18T13:05:13+02:00 ability to set a z3 timeout, plus print the rng state --HG-- branch : fix-intutils-ovf-bug - - - - - 4a7f7700 by Carl Friedrich Bolz-Tereick at 2022-10-18T13:34:39+02:00 fix propagate_bounds_INT_MUL, which is not always valid, only if no overflow occurs --HG-- branch : fix-intutils-ovf-bug - - - - - 0a06a2f0 by Carl Friedrich Bolz-Tereick at 2022-10-18T13:54:20+02:00 equivalent bug for lshift --HG-- branch : fix-intutils-ovf-bug - - - - - 4627ff02 by Carl Friedrich Bolz-Tereick at 2022-10-18T22:09:29+02:00 test and fix: wrong api usage in int_add chaining logic --HG-- branch : fix-intutils-ovf-bug - - - - - 2440591f by Carl Friedrich Bolz-Tereick at 2022-10-18T22:09:42+02:00 comment out the pdb --HG-- branch : fix-intutils-ovf-bug - - - - - aab30f47 by Carl Friedrich Bolz-Tereick at 2022-10-18T22:15:46+02:00 make it pass with z3 --HG-- branch : fix-intutils-ovf-bug - - - - - 01a0f381 by Carl Friedrich Bolz-Tereick at 2022-10-19T11:58:00+02:00 start fixing the shift test mess --HG-- branch : fix-intutils-ovf-bug - - - - - 99bb8114 by Carl Friedrich Bolz-Tereick at 2022-10-19T12:16:46+02:00 some cleanups. the idea of checking the textual expected output cannot work --HG-- branch : fix-intutils-ovf-bug - - - - - 58402933 by Carl Friedrich Bolz-Tereick at 2022-10-19T22:11:06+02:00 print nicer debug output when stuff goes wrong --HG-- branch : fix-intutils-ovf-bug - - - - - 0cb67cdc by Carl Friedrich Bolz-Tereick at 2022-10-19T22:11:27+02:00 test and fix: we can't reuse results of non-ovfcheck operations for ovfcheck operations (only in the over direction) --HG-- branch : fix-intutils-ovf-bug - - - - - ab3756a6 by Carl Friedrich Bolz-Tereick at 2022-10-19T22:55:36+02:00 some timing info --HG-- branch : fix-intutils-ovf-bug - - - - - 50415155 by Carl Friedrich Bolz-Tereick at 2022-10-21T11:10:02+02:00 use a not too large default timeout, to make the buildbot not wait forever --HG-- branch : fix-intutils-ovf-bug - - - - - df95139d by Carl Friedrich Bolz-Tereick at 2022-10-21T11:11:20+02:00 start supporting py_div and py_mod --HG-- branch : fix-intutils-ovf-bug - - - - - 8dd5e188 by Carl Friedrich Bolz-Tereick at 2022-10-21T11:36:00+02:00 fix call_pure_results --HG-- branch : fix-intutils-ovf-bug - - - - - 37eecd67 by Carl Friedrich Bolz-Tereick at 2022-10-21T11:43:33+02:00 vary the number of input vars and the block length --HG-- branch : fix-intutils-ovf-bug - - - - - f4ff062a by Carl Friedrich Bolz-Tereick at 2022-10-21T11:59:16+02:00 re-seed every iteration for easier re-running of failures --HG-- branch : fix-intutils-ovf-bug - - - - - e89b4a2f by Carl Friedrich Bolz-Tereick at 2022-10-21T12:51:22+02:00 merge default --HG-- branch : fix-intutils-ovf-bug - - - - - ef90cb7c by Carl Friedrich Bolz-Tereick at 2022-10-21T13:59:07+02:00 fix --HG-- branch : fix-intutils-ovf-bug - - - - - 71b985ed by Carl Friedrich Bolz-Tereick at 2022-10-21T14:26:06+02:00 we need to exclude the overflow case for int division --HG-- branch : fix-intutils-ovf-bug - - - - - e695bcb2 by Carl Friedrich Bolz-Tereick at 2022-10-22T22:12:21+02:00 oops, fix division by zero --HG-- branch : fix-intutils-ovf-bug - - - - - ebe971d6 by Carl Friedrich Bolz-Tereick at 2022-11-04T17:42:07+01:00 merge default --HG-- branch : fix-intutils-ovf-bug - - - - - 710f69ab by Carl Friedrich Bolz-Tereick at 2022-12-04T20:10:54+01:00 fix --HG-- branch : fix-intutils-ovf-bug - - - - - df1bcbdd by Carl Friedrich Bolz-Tereick at 2022-12-04T20:11:03+01:00 merge default --HG-- branch : fix-intutils-ovf-bug - - - - - 70f3d8b3 by Carl Friedrich Bolz-Tereick at 2022-12-06T22:23:16+01:00 #3832 merge fix-intutils-ovf-bug: - fix several crashes and miscompilation bugs all related to integer optimizations - add a simple z3 bounded model checker for integer traces, which checks that the optimized trace and the input trace behave identically - this operates on all unit tests in test_optimizeintbound also generates some random tests - - - - - 10 changed files: - rpython/jit/backend/conftest.py - rpython/jit/backend/test/test_random.py - rpython/jit/conftest.py - rpython/jit/metainterp/optimizeopt/intbounds.py - rpython/jit/metainterp/optimizeopt/intutils.py - rpython/jit/metainterp/optimizeopt/optimizer.py - rpython/jit/metainterp/optimizeopt/pure.py - rpython/jit/metainterp/optimizeopt/rewrite.py - rpython/jit/metainterp/optimizeopt/test/test_intbound.py - rpython/jit/metainterp/optimizeopt/test/test_optimizebasic.py View it on Heptapod: https://foss.heptapod.net/pypy/pypy/-/compare/a2b7bfb569e63eff77050e9d31a87a243bf70906...70f3d8b367d8b48057415d73105c92189d200f61 -- View it on Heptapod: https://foss.heptapod.net/pypy/pypy/-/compare/a2b7bfb569e63eff77050e9d31a87a243bf70906...70f3d8b367d8b48057415d73105c92189d200f61 You're receiving this email because of your account on foss.heptapod.net.
_______________________________________________ pypy-commit mailing list -- pypy-commit@python.org To unsubscribe send an email to pypy-commit-le...@python.org https://mail.python.org/mailman3/lists/pypy-commit.python.org/ Member address: arch...@mail-archive.com