Author: Matti Picus <matti.pi...@gmail.com> Branch: py3.6 Changeset: r98318:010bdf9668e6 Date: 2019-12-18 23:33 +0200 http://bitbucket.org/pypy/pypy/changeset/010bdf9668e6/
Log: merge default into py3.6 diff --git a/lib_pypy/pyrepl/completing_reader.py b/lib_pypy/pyrepl/completing_reader.py --- a/lib_pypy/pyrepl/completing_reader.py +++ b/lib_pypy/pyrepl/completing_reader.py @@ -266,7 +266,7 @@ reader.ps1 = "c**> " reader.ps2 = "c/*> " reader.ps3 = "c|*> " - reader.ps4 = "c\*> " + reader.ps4 = r"c\*> " while reader.readline(): pass diff --git a/lib_pypy/pyrepl/reader.py b/lib_pypy/pyrepl/reader.py --- a/lib_pypy/pyrepl/reader.py +++ b/lib_pypy/pyrepl/reader.py @@ -648,7 +648,7 @@ reader.ps1 = "**> " reader.ps2 = "/*> " reader.ps3 = "|*> " - reader.ps4 = "\*> " + reader.ps4 = r"\*> " while reader.readline(): pass diff --git a/rpython/translator/c/test/test_standalone.py b/rpython/translator/c/test/test_standalone.py --- a/rpython/translator/c/test/test_standalone.py +++ b/rpython/translator/c/test/test_standalone.py @@ -1146,6 +1146,33 @@ out = cbuilder.cmdexec('') assert out.strip() == 'ok' + def test_int_manipulation(self): + # Distilled from micronumpy.descriptor._compute_hash + # which, for some version of gcc8 compiler produced + # out1 == out2 + from rpython.rlib.rarithmetic import intmask + + def entry_point(argv): + if len(argv) < 4: + print 'need 3 arguments, not %s' % str(argv) + return -1 + flags = 0 + x = 0x345678 + y = 0x345678 + s = str(argv[1])[0] + y = intmask((1000003 * y) ^ ord(s)) + y = intmask((1000003 * y) ^ ord(str(argv[2])[0])) + y = (1000003 * y) + y = intmask(y ^ flags) + y = intmask((1000003 * y) ^ int(argv[3])) + print y + return 0 + + t, cbuilder = self.compile(entry_point) + out1 = cbuilder.cmdexec(args=['i', '>', '64']) + out2 = cbuilder.cmdexec(args=['f', '>', '64']) + assert out1 != out2 + class TestThread(object): gcrootfinder = 'shadowstack' _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit