From tracker at bugs.pypy.org Sat Sep 1 17:51:54 2012 From: tracker at bugs.pypy.org (David) Date: Sat, 01 Sep 2012 15:51:54 +0000 Subject: [pypy-issue] [issue1249] Itertools.tee not working correctly with pypy? In-Reply-To: <1346514714.49.0.707536841312.issue1249@bugs.pypy.org> Message-ID: <1346514714.49.0.707536841312.issue1249@bugs.pypy.org> New submission from David : Hi! I'm the developer of Jedi: https://github.com/davidhalter/jedi, which is an auto-completion library. I try to support Python 2.5-3.2. Out of curiosity, I tried to use PyPy, which worked incredibly well! But: Some tests just won't work sometimes with PyPy. # for i in $(seq 10); do pypy test/run.py goto 92; done sometimes works, and sometimes doesn't. It seems like, itertools.tee sometimes returns old values. PyPy seems working perfectly fine, if I use iter(list()) arround all the itertools.tee objects. (I'm speaking about the iterator on jedi/evaluate.py:1338). Is there something that I'm missing? Tests of Python 2.5-3.2 are passing: http://travis-ci.org/#!/davidhalter/jedi Cheers! David ---------- messages: 4691 nosy: David, pypy-issue priority: bug release: 1.8 status: chatting title: Itertools.tee not working correctly with pypy? ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 1 18:06:37 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sat, 01 Sep 2012 16:06:37 +0000 Subject: [pypy-issue] [issue1249] Itertools.tee not working correctly with pypy? In-Reply-To: <1346514714.49.0.707536841312.issue1249@bugs.pypy.org> Message-ID: <1346515597.2.0.420744160685.issue1249@bugs.pypy.org> Armin Rigo added the comment: In evaluate(), I see that you use weakrefs a lot, and you seem to do very different things depending on whether weakrefs are still alive or already dead. I would need to look more deeply into the code, but it seems to me that it is enough to cause the behavior under PyPy to not match the behavior under CPython. In PyPy, a weakref's target can still be alive even after the object is supposedly dead, for some unspecified amount of time. On CPython you get a partially more consistent behavior. But it is wrong to rely on it anyway: e.g. if you create circular references between objects A and B, and there is a pointer from A to C and a weakref from D to C, then on CPython too the weakref will appear to be alive for an unexpected longer time. ---------- nosy: +arigo ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 1 18:48:09 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sat, 01 Sep 2012 16:48:09 +0000 Subject: [pypy-issue] [issue1249] Itertools.tee not working correctly with pypy? In-Reply-To: <1346514714.49.0.707536841312.issue1249@bugs.pypy.org> Message-ID: <1346518089.42.0.538089476423.issue1249@bugs.pypy.org> Armin Rigo added the comment: Ok, found it. You're right, it's really a bug in itertools.tee(). Test in 7307034ccd39, will be fixed soon. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 1 18:50:18 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sat, 01 Sep 2012 16:50:18 +0000 Subject: [pypy-issue] [issue1249] Itertools.tee not working correctly with pypy? In-Reply-To: <1346514714.49.0.707536841312.issue1249@bugs.pypy.org> Message-ID: <1346518218.92.0.531189282444.issue1249@bugs.pypy.org> Armin Rigo added the comment: Fix in b20a8c159d25. ---------- status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 1 20:38:35 2012 From: tracker at bugs.pypy.org (Erik Allik) Date: Sat, 01 Sep 2012 18:38:35 +0000 Subject: [pypy-issue] [issue1250] "Bus error: 10" with infinite @property rec. inside nose.twistedtools.deferred In-Reply-To: <1346524715.28.0.595140415331.issue1250@bugs.pypy.org> Message-ID: <1346524715.28.0.595140415331.issue1250@bugs.pypy.org> New submission from Erik Allik : To reproduce: from nose.twistedtools import deferred class Foo(object): # both with new-style and old-style @property # needed to reproduce the bug def prop(self): return self.prop @deferred(timeout=None) # needed to reproduce the bug def test(): Foo().prop ...and run with `nosetests whateverfilename.py` $ pypy --version Python 2.7.2 (341e1e3821ff, Jun 07 2012, 15:42:54) [PyPy 1.9.0 with GCC 4.2.1] ---------- messages: 4695 nosy: eallik, pypy-issue priority: bug release: 1.9 status: unread title: "Bus error: 10" with infinite @property rec. inside nose.twistedtools.deferred ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 1 20:39:54 2012 From: tracker at bugs.pypy.org (Erik Allik) Date: Sat, 01 Sep 2012 18:39:54 +0000 Subject: [pypy-issue] [issue1250] "Bus error: 10" with infinite @property rec. inside nose.twistedtools.deferred In-Reply-To: <1346524715.28.0.595140415331.issue1250@bugs.pypy.org> Message-ID: <1346524794.22.0.579890830529.issue1250@bugs.pypy.org> Erik Allik added the comment: *might* be relevant: nose.twistedtools.deferred runs the test in a thread. ---------- status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 1 21:32:32 2012 From: tracker at bugs.pypy.org (Erik Allik) Date: Sat, 01 Sep 2012 19:32:32 +0000 Subject: [pypy-issue] [issue1250] "Bus error: 10" with infinite @property rec. inside nose.twistedtools.deferred In-Reply-To: <1346524715.28.0.595140415331.issue1250@bugs.pypy.org> Message-ID: <1346527952.84.0.125014279936.issue1250@bugs.pypy.org> Erik Allik added the comment: verified on pypy-c-jit-57061-5f0a7929c8ea-osx64 -- crashes ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 1 21:51:35 2012 From: tracker at bugs.pypy.org (Fijal) Date: Sat, 01 Sep 2012 19:51:35 +0000 Subject: [pypy-issue] [issue1250] "Bus error: 10" with infinite @property rec. inside nose.twistedtools.deferred In-Reply-To: <1346524715.28.0.595140415331.issue1250@bugs.pypy.org> Message-ID: <1346529095.59.0.24676565182.issue1250@bugs.pypy.org> Fijal added the comment: Unreproduced on linux 64. might be something wrong with OS X stack depth detection code. ---------- nosy: +fijal ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Sep 2 01:46:22 2012 From: tracker at bugs.pypy.org (David) Date: Sat, 01 Sep 2012 23:46:22 +0000 Subject: [pypy-issue] [issue1249] Itertools.tee not working correctly with pypy? In-Reply-To: <1346514714.49.0.707536841312.issue1249@bugs.pypy.org> Message-ID: <1346543182.47.0.777954934249.issue1249@bugs.pypy.org> David added the comment: oh, that was fast! thank you very much. that's the commit, if anyone is searching: https://bitbucket.org/pypy/pypy/changeset/b20a8c159d25b682cfcfaa1462008b3f ---------- status: resolved -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Sep 2 01:59:48 2012 From: tracker at bugs.pypy.org (David) Date: Sat, 01 Sep 2012 23:59:48 +0000 Subject: [pypy-issue] [issue1249] Itertools.tee not working correctly with pypy? In-Reply-To: <1346514714.49.0.707536841312.issue1249@bugs.pypy.org> Message-ID: <1346543988.69.0.414023391819.issue1249@bugs.pypy.org> David added the comment: sorry, messed up the status. great work anyways! ---------- status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Sep 3 12:02:32 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Mon, 03 Sep 2012 10:02:32 +0000 Subject: [pypy-issue] [issue1233] str() types can't be used with ctypes's py_object() In-Reply-To: <1344763493.64.0.519996205744.issue1233@bugs.pypy.org> Message-ID: <1346666551.92.0.359711110112.issue1233@bugs.pypy.org> Armin Rigo added the comment: Passing a "payload" argument for a callback is needed if you were writing all C code, but not if you are writing the callback in Python. Can't you use the following scheme instead? def make_callback(payload_string): def callback(args..): ... use payload_string ... return callback Then you pass to C code the callback from "make_callback(string)". The c_void_p argument is not useful and can always be NULL. ---------- nosy: +arigo ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Sep 3 12:07:40 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Mon, 03 Sep 2012 10:07:40 +0000 Subject: [pypy-issue] [issue1233] str() types can't be used with ctypes's py_object() In-Reply-To: <1344763493.64.0.519996205744.issue1233@bugs.pypy.org> Message-ID: <1346666860.08.0.392402201462.issue1233@bugs.pypy.org> Armin Rigo added the comment: For example, the function add_timer() from timer.py can be rewritten much more simply as follows (untested code): def add_timer(interval, callback, param=None): if interval < 0: raise ValueError("interval must not be smaller than 0") def llcallback(x, y, null_ignored): return callback(x, y, param) timerid = dll.SDL_AddTimer(interval, llcallback, 0) if timerid == 0 or not bool(timerid): raise SDLError() return timerid ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Sep 3 18:48:19 2012 From: tracker at bugs.pypy.org (Marcus von Appen) Date: Mon, 03 Sep 2012 16:48:19 +0000 Subject: [pypy-issue] [issue1233] str() types can't be used with ctypes's py_object() In-Reply-To: <1344763493.64.0.519996205744.issue1233@bugs.pypy.org> Message-ID: <1346690899.35.0.567522576721.issue1233@bugs.pypy.org> Marcus von Appen added the comment: I know that using a separate hook would be possible (as well as using an object class wrapper for the callback). As written earlier, it would be somewhat more comfortable, though, if one could just pass the payload directly to the C code hook. This also would allow 3rd party C code APIs to pick up the data and do further processing with it without the need to create a separate wrapper, which needs to be unpacked elsewhere beforehand. For pure Python interaction, the callback wrapper is an easy solution, for a more generic approach in PyPy, one currently would need to put the argument into another capsule to pass it around, which makes code supposed to be run in a CPython or PyPy environment more complex. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Sep 3 19:38:08 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Mon, 03 Sep 2012 17:38:08 +0000 Subject: [pypy-issue] [issue1233] str() types can't be used with ctypes's py_object() In-Reply-To: <1344763493.64.0.519996205744.issue1233@bugs.pypy.org> Message-ID: <1346693888.32.0.127264910786.issue1233@bugs.pypy.org> Armin Rigo added the comment: I suppose "py_object" can be supported with enough hacks. You're free to try, too: start with writing py_object.__init__(x) that stores 'x' in a global list and returns the index. It may look obscure, but that's exactly how we would implement it on pypy. More precisely, we would add some (pure Python) logic to lib_pypy/_ctypes/*.py. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Sep 3 19:40:33 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Mon, 03 Sep 2012 17:40:33 +0000 Subject: [pypy-issue] [issue1248] please build with older GNU libc on Linux/amd64 In-Reply-To: <1346476259.72.0.54490436525.issue1248@bugs.pypy.org> Message-ID: <1346694033.54.0.778370298832.issue1248@bugs.pypy.org> Armin Rigo added the comment: How? If you have a precise step-by-step guide of how to build a Linux binary using some older dependencies than the ones that happen to be installed on the system, and if this guide is not too long and complicated, we could try. Otherwise, sorry, we do our best for Linux binaries but keep hitting these issues all the time (we just fixed the one with openssl). ---------- nosy: +arigo status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Sep 3 19:45:07 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Mon, 03 Sep 2012 17:45:07 +0000 Subject: [pypy-issue] [issue1244] bogus test In-Reply-To: <1345958585.27.0.0708688786784.issue1244@bugs.pypy.org> Message-ID: <1346694307.43.0.795850284517.issue1244@bugs.pypy.org> Armin Rigo added the comment: Fixed in 5b12e8df1272. ---------- nosy: +arigo status: unread -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Sep 3 19:52:15 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Mon, 03 Sep 2012 17:52:15 +0000 Subject: [pypy-issue] [issue1242] lib_pypy/_ctypes/function.py accesses _rawffi.get_last_error in linux In-Reply-To: <1345899640.51.0.331465536862.issue1242@bugs.pypy.org> Message-ID: <1346694735.59.0.853633617055.issue1242@bugs.pypy.org> Armin Rigo added the comment: Fixed (2071a44dfde1), differently: by making sure _rawffi.{get,set}_last_error exists. On non-Windows it is a pair of no-op functions. ---------- nosy: +arigo status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Sep 3 21:06:25 2012 From: tracker at bugs.pypy.org (Marcus von Appen) Date: Mon, 03 Sep 2012 19:06:25 +0000 Subject: [pypy-issue] [issue1233] str() types can't be used with ctypes's py_object() In-Reply-To: <1344763493.64.0.519996205744.issue1233@bugs.pypy.org> Message-ID: <1346699185.55.0.226796787326.issue1233@bugs.pypy.org> Marcus von Appen added the comment: Am I right with the assumption that the global list would emulate the pointer value, if we talk about PyObject*? So - without looking at the code of the PyPy implementation on py_object - it acts as a sort of proxy, which returns (or would return) the index of the real object for accessing? ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Sep 3 21:10:12 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Mon, 03 Sep 2012 19:10:12 +0000 Subject: [pypy-issue] [issue1233] str() types can't be used with ctypes's py_object() In-Reply-To: <1344763493.64.0.519996205744.issue1233@bugs.pypy.org> Message-ID: <1346699412.93.0.455252633594.issue1233@bugs.pypy.org> Armin Rigo added the comment: Yes, exactly. "py_object" is not implemented so far in PyPy, but that's how we would need to implement it. There is no direct solution because you can't take the address of a PyPy object and pass it to C code --- to start with we have a moving garbage collector. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 4 22:07:45 2012 From: tracker at bugs.pypy.org (Andy Pilate) Date: Tue, 04 Sep 2012 20:07:45 +0000 Subject: [pypy-issue] [issue1251] distutil but in pypy when installing Limnoria In-Reply-To: <1346789265.58.0.511392643252.issue1251@bugs.pypy.org> Message-ID: <1346789265.58.0.511392643252.issue1251@bugs.pypy.org> New submission from Andy Pilate : There is a pypy but when installing Limnoria. I don't know where pypy fail, but it's failing and it's not the fault of Limnoria. How to reproduce : Pypy on ubuntu precise installed via apt-get git clone http://github.com/ProgVal/Limnoria cd Limnoria sudo pypy setup.py install cat src/version.py cat /usr/local/lib/pypy2.7/dist-packages/supybot/version.py ---------- messages: 4711 nosy: cubox, pypy-issue priority: bug status: unread title: distutil but in pypy when installing Limnoria ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 4 22:23:33 2012 From: tracker at bugs.pypy.org (Andy Pilate) Date: Tue, 04 Sep 2012 20:23:33 +0000 Subject: [pypy-issue] [issue1252] Limnoria can't run with pypy In-Reply-To: <1346790213.2.0.651413002973.issue1252@bugs.pypy.org> Message-ID: <1346790213.2.0.651413002973.issue1252@bugs.pypy.org> New submission from Andy Pilate : Don't know if it's the fault of pypy or Limnoria, but it is working with cpython. Log is at http://cubox.me/files/prog.txt How to reproduce : git clone http://github.com/ProgVal/Limnoria cd Limnoria sudo pypy setup.py install cp src/version.py /usr/local/lib/pypy2.7/dist-packages/supybot/version.py #See an other bug report by me for this issue. mkdir /tmp/lol/42 && cd /tmp/lol/42 supybot-wizard # I will don't explain you, just enter random values. pypy /usr/local/bin/supybot *.conf Enjoy! ---------- messages: 4712 nosy: cubox, pypy-issue priority: bug status: unread title: Limnoria can't run with pypy ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Sep 5 02:05:16 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Wed, 05 Sep 2012 00:05:16 +0000 Subject: [pypy-issue] [issue1252] Limnoria can't run with pypy In-Reply-To: <1346790213.2.0.651413002973.issue1252@bugs.pypy.org> Message-ID: <1346803516.92.0.778819287086.issue1252@bugs.pypy.org> Amaury Forgeot d Arc added the comment: See minimal test case below. It seems that re.sub() returns the input string when no match was found; this optimization should not be done when a string subclass is given. PyPy should be fixed, but this could be considered an implementation detail as well. The class IrcString should be more robust and ensure that x.lowered is not a IrcString! otherwise the __hash__ method enters a nasty recursion. x.lowered = str(toLower(x)) import re class MyString(str): pass s1 = MyString('zz') s2 = re.compile('aa').sub('bb', s1) print s1 is s2 # True in Pypy which returns a str subclass; # False for CPython which creates an exact str instance. ---------- nosy: +afa status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Sep 5 02:11:02 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Wed, 05 Sep 2012 00:11:02 +0000 Subject: [pypy-issue] [issue1251] distutil bug in pypy when installing Limnoria In-Reply-To: <1346789265.58.0.511392643252.issue1251@bugs.pypy.org> Message-ID: <1346803862.26.0.212733107184.issue1251@bugs.pypy.org> Amaury Forgeot d Arc added the comment: setup.py has this code:: open(...version.py', 'w').write(...) See in http://pypy.readthedocs.org/en/latest/cpython_differences.html#differences-related-to- garbage-collection-strategies the code should really close the file, or use a "with" statement to ensure that data is flushed: with open(...version.py', 'w') as f: f.write(...) ---------- nosy: +afa status: unread -> wontfix ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Sep 5 09:15:13 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Wed, 05 Sep 2012 07:15:13 +0000 Subject: [pypy-issue] [issue1252] Limnoria can't run with pypy In-Reply-To: <1346790213.2.0.651413002973.issue1252@bugs.pypy.org> Message-ID: <1346829313.27.0.193218349674.issue1252@bugs.pypy.org> Armin Rigo added the comment: Fixed in 89ae68436535. ---------- nosy: +arigo status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Sep 5 10:44:04 2012 From: tracker at bugs.pypy.org (Andy Pilate) Date: Wed, 05 Sep 2012 08:44:04 +0000 Subject: [pypy-issue] [issue1251] distutil bug in pypy when installing Limnoria In-Reply-To: <1346789265.58.0.511392643252.issue1251@bugs.pypy.org> Message-ID: <1346834644.8.0.361387720228.issue1251@bugs.pypy.org> Andy Pilate added the comment: Oh, okey. Reading the code is not my job ;) I will submit a merge request with the fix in Limnoria. Thanks for your time :D ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Sep 7 11:44:03 2012 From: tracker at bugs.pypy.org (Pigmej) Date: Fri, 07 Sep 2012 09:44:03 +0000 Subject: [pypy-issue] [issue1253] compile => RuntimeError: maximum recursion depth exceeded In-Reply-To: <1347011043.22.0.852237039186.issue1253@bugs.pypy.org> Message-ID: <1347011043.22.0.852237039186.issue1253@bugs.pypy.org> New submission from Pigmej : Run attached code on CPython and on PyPy. It will work fine on CPython, but will crash on PyPy, because o "RuntimeError: maximum recursion depth exceeded". At current trunk it crashes on 6400, so in case of change please verify the while loop. // I know that code makes no sense at all. ---------- files: pypy_rec.py messages: 4717 nosy: pigmej, pypy-issue priority: bug status: unread title: compile => RuntimeError: maximum recursion depth exceeded ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 8 11:24:35 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sat, 08 Sep 2012 09:24:35 +0000 Subject: [pypy-issue] [issue1244] bogus test In-Reply-To: <1345958585.27.0.0708688786784.issue1244@bugs.pypy.org> Message-ID: <1347096275.62.0.580297853048.issue1244@bugs.pypy.org> Armin Rigo added the comment: Checked in a65ca3de676a. Does it help? (Please, can you tell us *in all cases* at least which test files you're talking about? There are two completely different places with a similar few lines.) ---------- status: chatting -> testing ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 8 11:26:16 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sat, 08 Sep 2012 09:26:16 +0000 Subject: [pypy-issue] [issue1254] meta-bug for post-stdlib-2.7.3 win32 breakage In-Reply-To: <1347093369.93.0.363725480893.issue1254@bugs.pypy.org> Message-ID: <1347096376.89.0.0454012268586.issue1254@bugs.pypy.org> Armin Rigo added the comment: Define it ourselves to what value? ---------- nosy: +arigo status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 8 22:32:54 2012 From: tracker at bugs.pypy.org (mattip) Date: Sat, 08 Sep 2012 20:32:54 +0000 Subject: [pypy-issue] [issue1254] meta-bug for post-stdlib-2.7.3 win32 breakage In-Reply-To: <1347093369.93.0.363725480893.issue1254@bugs.pypy.org> Message-ID: <1347136374.86.0.344812115414.issue1254@bugs.pypy.org> mattip added the comment: vs2008 defines _MAX_ENV in stdlib.h according to msdn Fixed with changeset 2050ccf55674 which no longer crashes test rlib/test/test_rwin32.py here is the msdn link - http://msdn.microsoft.com/en-us/library/e8abs9d2(v=vs.80).aspx ---------- nosy: +mattip status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Sep 9 06:19:09 2012 From: tracker at bugs.pypy.org (mattip) Date: Sun, 09 Sep 2012 04:19:09 +0000 Subject: [pypy-issue] [issue1254] meta-bug for post-stdlib-2.7.3 win32 breakage In-Reply-To: <1347093369.93.0.363725480893.issue1254@bugs.pypy.org> Message-ID: <1347164348.71.0.409710094176.issue1254@bugs.pypy.org> mattip added the comment: new problem: self.random_context = None breaks translation on Windows module/posix/interp_posix.py contains a State class that has a _freeze_ method that sets self.random_context to None. This breaks translation on the current trunk. It does not show up on module/posix/test/test_posix2 (which still has 4 failing tests, but none seem to be related). How can I write a test for _freeze_? ---------- nosy: +afa status: resolved -> in-progress ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Sep 9 19:22:51 2012 From: tracker at bugs.pypy.org (dremon) Date: Sun, 09 Sep 2012 17:22:51 +0000 Subject: [pypy-issue] [issue1255] signal.pause blocks socket event processing In-Reply-To: <1347211371.82.0.592320296484.issue1255@bugs.pypy.org> Message-ID: <1347211371.82.0.592320296484.issue1255@bugs.pypy.org> New submission from dremon : When select.select is used for server socket in the separate thread and the main thread pauses with signal.pause call no socket events are processed. Attached is a sample script (works under CPython but breaks in PyPy). ---------- files: tcpserv.py messages: 4725 nosy: dremon, pypy-issue priority: bug status: unread title: signal.pause blocks socket event processing ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Sep 9 20:19:22 2012 From: tracker at bugs.pypy.org (Julian Berman) Date: Sun, 09 Sep 2012 18:19:22 +0000 Subject: [pypy-issue] [issue1256] Writing bytes to a StringIO expecting unicode exhibits a confusing error message In-Reply-To: <1347214762.49.0.627922484954.issue1256@bugs.pypy.org> Message-ID: <1347214762.49.0.627922484954.issue1256@bugs.pypy.org> New submission from Julian Berman : This was fixed in CPython here, http://bugs.python.org/issue12434 , apparently without a test. ---------- files: errmsg.patch messages: 4726 nosy: Julian, pypy-issue priority: feature status: unread title: Writing bytes to a StringIO expecting unicode exhibits a confusing error message ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Sep 9 20:35:24 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sun, 09 Sep 2012 18:35:24 +0000 Subject: [pypy-issue] [issue1256] Writing bytes to a StringIO expecting unicode exhibits a confusing error message In-Reply-To: <1347214762.49.0.627922484954.issue1256@bugs.pypy.org> Message-ID: <1347215724.23.0.426306793526.issue1256@bugs.pypy.org> Armin Rigo added the comment: Thanks! Fixed (7d5b0a808fc9). Indeed, the message was clearly bogus IMHO too. ---------- nosy: +arigo status: unread -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Sep 9 20:43:48 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sun, 09 Sep 2012 18:43:48 +0000 Subject: [pypy-issue] [issue1255] signal.pause blocks socket event processing In-Reply-To: <1347211371.82.0.592320296484.issue1255@bugs.pypy.org> Message-ID: <1347216228.9.0.380756157398.issue1255@bugs.pypy.org> Armin Rigo added the comment: thread.signal() does not release the GIL in PyPy! That's bogus. Testing the fix now... ---------- nosy: +arigo status: unread -> in-progress ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Sep 9 20:49:09 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sun, 09 Sep 2012 18:49:09 +0000 Subject: [pypy-issue] [issue1255] signal.pause blocks socket event processing In-Reply-To: <1347211371.82.0.592320296484.issue1255@bugs.pypy.org> Message-ID: <1347216549.1.0.127445059998.issue1255@bugs.pypy.org> Armin Rigo added the comment: er, I mean signal.pause(), sorry. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Sep 9 21:31:04 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sun, 09 Sep 2012 19:31:04 +0000 Subject: [pypy-issue] [issue1255] signal.pause blocks socket event processing In-Reply-To: <1347211371.82.0.592320296484.issue1255@bugs.pypy.org> Message-ID: <1347219064.96.0.754483337163.issue1255@bugs.pypy.org> Armin Rigo added the comment: Fixed (5f6bd03d6b4c), thanks for the report! ---------- status: in-progress -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Sep 9 21:59:22 2012 From: tracker at bugs.pypy.org (dremon) Date: Sun, 09 Sep 2012 19:59:22 +0000 Subject: [pypy-issue] [issue1257] Memory leak when using web.py In-Reply-To: <1347220762.49.0.575714347026.issue1257@bugs.pypy.org> Message-ID: <1347220762.49.0.575714347026.issue1257@bugs.pypy.org> New submission from dremon : web.py, used as a standalone HTTP server. I noticed a steady resident memory growth of the pypy process, probably objects are not being gc'ed. With pyopenssl adapter it grows faster. Attached is a test script (requires web.py and pyopenssl). Commands used for client connection: while `/bin/true`; do curl http://localhost:8700; done while `/bin/true`; do curl -k https://localhost:8700; done ---------- files: test_httpservice.py messages: 4731 nosy: dremon, pypy-issue priority: bug status: unread title: Memory leak when using web.py ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Sep 9 22:57:22 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sun, 09 Sep 2012 20:57:22 +0000 Subject: [pypy-issue] [issue1254] meta-bug for post-stdlib-2.7.3 win32 breakage In-Reply-To: <1347093369.93.0.363725480893.issue1254@bugs.pypy.org> Message-ID: <1347224242.34.0.645362505877.issue1254@bugs.pypy.org> Armin Rigo added the comment: You can't write a simple test for _freeze_, precisely because it's only used for translation. Attempted fix in 1feab101071c (not tested). ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Sep 10 05:14:10 2012 From: tracker at bugs.pypy.org (mattip) Date: Mon, 10 Sep 2012 03:14:10 +0000 Subject: [pypy-issue] [issue1254] meta-bug for post-stdlib-2.7.3 win32 breakage In-Reply-To: <1347093369.93.0.363725480893.issue1254@bugs.pypy.org> Message-ID: <1347246850.92.0.406711939769.issue1254@bugs.pypy.org> mattip added the comment: translation succeeds. Reinstalling VS2008 with sp1 http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express yields _MAX_ENV in stdlib.h, see uploaded file ________________________________________ PyPy bug tracker ________________________________________ -------------- next part -------------- /*** *stdlib.h - declarations/definitions for commonly used library functions * * Copyright (c) Microsoft Corporation. All rights reserved. * *Purpose: * This include file contains the function declarations for commonly * used library functions which either don't fit somewhere else, or, * cannot be declared in the normal place for other reasons. * [ANSI] * * [Public] * ****/ #if _MSC_VER > 1000 #pragma once #endif #ifndef _INC_STDLIB #define _INC_STDLIB #include #include #ifdef _MSC_VER /* * Currently, all MS C compilers for Win32 platforms default to 8 byte * alignment. */ #pragma pack(push,_CRT_PACKING) #endif /* _MSC_VER */ #ifdef __cplusplus extern "C" { #endif /* Define NULL pointer value */ #ifndef NULL #ifdef __cplusplus #define NULL 0 #else #define NULL ((void *)0) #endif #endif /* Definition of the argument values for the exit() function */ #define EXIT_SUCCESS 0 #define EXIT_FAILURE 1 #ifndef _ONEXIT_T_DEFINED #if !defined (_M_CEE_PURE) typedef int (__cdecl * _onexit_t)(void); #else typedef int (__clrcall * _onexit_t)(void); typedef _onexit_t _onexit_m_t; #endif #if defined (_M_CEE_MIXED) typedef int (__clrcall * _onexit_m_t)(void); #endif #if !__STDC__ /* Non-ANSI name for compatibility */ #define onexit_t _onexit_t #endif #define _ONEXIT_T_DEFINED #endif /* Data structure definitions for div and ldiv runtimes. */ #ifndef _DIV_T_DEFINED typedef struct _div_t { int quot; int rem; } div_t; typedef struct _ldiv_t { long quot; long rem; } ldiv_t; #define _DIV_T_DEFINED #endif /* * structs used to fool the compiler into not generating floating point * instructions when copying and pushing [long] double values */ #ifndef _CRT_DOUBLE_DEC #ifndef _LDSUPPORT #pragma pack(4) typedef struct { unsigned char ld[10]; } _LDOUBLE; #pragma pack() #define _PTR_LD(x) ((unsigned char *)(&(x)->ld)) #else /* push and pop long, which is #defined as __int64 by a spec2k test */ #pragma push_macro("long") #undef long typedef long double _LDOUBLE; #pragma pop_macro("long") #define _PTR_LD(x) ((unsigned char *)(x)) #endif typedef struct { double x; } _CRT_DOUBLE; typedef struct { float f; } _CRT_FLOAT; /* push and pop long, which is #defined as __int64 by a spec2k test */ #pragma push_macro("long") #undef long typedef struct { /* * Assume there is a long double type */ long double x; } _LONGDOUBLE; #pragma pop_macro("long") #pragma pack(4) typedef struct { unsigned char ld12[12]; } _LDBL12; #pragma pack() #define _CRT_DOUBLE_DEC #endif /* Maximum value that can be returned by the rand function. */ #define RAND_MAX 0x7fff /* * Maximum number of bytes in multi-byte character in the current locale * (also defined in ctype.h). */ #ifndef MB_CUR_MAX #ifdef _MT #define MB_CUR_MAX ___mb_cur_max_func() #else #define MB_CUR_MAX __mb_cur_max #endif #if !defined(_M_CEE_PURE) _CRTIMP extern int __mb_cur_max; #else _CRTIMP int* __cdecl __p___mb_cur_max(); #define __mb_cur_max (*__p___mb_cur_max()) #endif /* !defined(_M_CEE_PURE) */ _CRTIMP int __cdecl ___mb_cur_max_func(void); _CRTIMP int __cdecl ___mb_cur_max_l_func(_locale_t); #endif /* MB_CUR_MAX */ /* Minimum and maximum macros */ #define __max(a,b) (((a) > (b)) ? (a) : (b)) #define __min(a,b) (((a) < (b)) ? (a) : (b)) /* * Sizes for buffers used by the _makepath() and _splitpath() functions. * note that the sizes include space for 0-terminator */ #define _MAX_PATH 260 /* max. length of full pathname */ #define _MAX_DRIVE 3 /* max. length of drive component */ #define _MAX_DIR 256 /* max. length of path component */ #define _MAX_FNAME 256 /* max. length of file name component */ #define _MAX_EXT 256 /* max. length of extension component */ /* * Argument values for _set_error_mode(). */ #define _OUT_TO_DEFAULT 0 #define _OUT_TO_STDERR 1 #define _OUT_TO_MSGBOX 2 #define _REPORT_ERRMODE 3 /* * Argument values for _set_abort_behavior(). */ #define _WRITE_ABORT_MSG 0x1 #define _CALL_REPORTFAULT 0x2 /* * Sizes for buffers used by the getenv/putenv family of functions. */ #define _MAX_ENV 32767 #if !defined(_M_CEE_PURE) /* a purecall handler procedure. Never returns normally */ typedef void (__cdecl *_purecall_handler)(void); /* establishes a purecall handler for the process */ _CRTIMP _purecall_handler __cdecl _set_purecall_handler(_In_opt_ _purecall_handler _Handler); _CRTIMP _purecall_handler __cdecl _get_purecall_handler(); #endif #if defined(__cplusplus) extern "C++" { #if defined(_M_CEE_PURE) typedef void (__clrcall *_purecall_handler)(void); typedef _purecall_handler _purecall_handler_m; _MRTIMP _purecall_handler __cdecl _set_purecall_handler(_In_opt_ _purecall_handler _Handler); #endif #if defined(_M_CEE_MIXED) typedef void (__clrcall *_purecall_handler_m)(void); _MRTIMP _purecall_handler_m __cdecl _set_purecall_handler(_In_opt_ _purecall_handler_m _Handler); _MRTIMP _purecall_handler __cdecl _set_purecall_handler(_In_ int _Handler); /* To disambiguate NULL/0 */ #endif } #endif #if !defined(_M_CEE_PURE) /* a invalid_arg handler procedure. */ typedef void (__cdecl *_invalid_parameter_handler)(const wchar_t *, const wchar_t *, const wchar_t *, unsigned int, uintptr_t); /* establishes a invalid_arg handler for the process */ _CRTIMP _invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_In_opt_ _invalid_parameter_handler _Handler); _CRTIMP _invalid_parameter_handler __cdecl _get_invalid_parameter_handler(void); #endif #if defined(__cplusplus) extern "C++" { #if defined(_M_CEE_PURE) typedef void (__clrcall *_invalid_parameter_handler)(const wchar_t *, const wchar_t *, const wchar_t *, unsigned int, uintptr_t); typedef _invalid_parameter_handler _invalid_parameter_handler_m; _MRTIMP _invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_In_opt_ _invalid_parameter_handler _Handlerh); #endif #if defined(_M_CEE_MIXED) typedef void (__clrcall *_invalid_parameter_handler_m)(const wchar_t *, const wchar_t *, const wchar_t *, unsigned int, uintptr_t); _MRTIMP _invalid_parameter_handler_m __cdecl _set_invalid_parameter_handler(_In_opt_ _invalid_parameter_handler_m _Handlerh); _MRTIMP _invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_In_ int _Handler); /* To disambiguate NULL/0, only when we have both */ #endif } #endif /* External variable declarations */ #ifndef _CRT_ERRNO_DEFINED #define _CRT_ERRNO_DEFINED _CRTIMP extern int * __cdecl _errno(void); #define errno (*_errno()) errno_t __cdecl _set_errno(_In_ int _Value); errno_t __cdecl _get_errno(_Out_ int * _Value); #endif _CRTIMP unsigned long * __cdecl __doserrno(void); #define _doserrno (*__doserrno()) errno_t __cdecl _set_doserrno(_In_ unsigned long _Value); errno_t __cdecl _get_doserrno(_Out_ unsigned long * _Value); /* you can't modify this, but it is non-const for backcompat */ _CRTIMP _CRT_INSECURE_DEPRECATE(strerror) char ** __cdecl __sys_errlist(void); #define _sys_errlist (__sys_errlist()) _CRTIMP _CRT_INSECURE_DEPRECATE(strerror) int * __cdecl __sys_nerr(void); #define _sys_nerr (*__sys_nerr()) #if defined(_DLL) && defined(_M_IX86) _CRTIMP int * __cdecl __p___argc(void); _CRTIMP char *** __cdecl __p___argv(void); _CRTIMP wchar_t *** __cdecl __p___wargv(void); _CRTIMP char *** __cdecl __p__environ(void); _CRTIMP wchar_t *** __cdecl __p__wenviron(void); _CRTIMP char ** __cdecl __p__pgmptr(void); _CRTIMP wchar_t ** __cdecl __p__wpgmptr(void); #endif /* _M_IX86 && _DLL */ #if !defined(_M_CEE_PURE) _CRTIMP extern int __argc; /* count of cmd line args */ _CRTIMP extern char ** __argv; /* pointer to table of cmd line args */ _CRTIMP extern wchar_t ** __wargv; /* pointer to table of wide cmd line args */ #else _CRTIMP int* __cdecl __p___argc(); _CRTIMP char*** __cdecl __p___argv(); _CRTIMP wchar_t*** __cdecl __p___wargv(); #define __argv (*__p___argv()) #define __argc (*__p___argc()) #define __wargv (*__p___wargv()) #endif #if !defined(_M_CEE_PURE) #ifdef _POSIX_ extern char ** environ; /* pointer to environment table */ #else _CRTIMP extern char ** _environ; /* pointer to environment table */ _CRTIMP extern wchar_t ** _wenviron; /* pointer to wide environment table */ #endif /* _POSIX_ */ _CRT_INSECURE_DEPRECATE_GLOBALS(_get_pgmptr) _CRTIMP extern char * _pgmptr; /* points to the module (EXE) name */ _CRT_INSECURE_DEPRECATE_GLOBALS(_get_wpgmptr) _CRTIMP extern wchar_t * _wpgmptr; /* points to the module (EXE) wide name */ #else _CRTIMP char*** __cdecl __p__environ(); _CRTIMP wchar_t*** __cdecl __p__wenviron(); _CRT_INSECURE_DEPRECATE_GLOBALS(_get_pgmptr) _CRTIMP char** __cdecl __p__pgmptr(); _CRT_INSECURE_DEPRECATE_GLOBALS(_get_wpgmptr) _CRTIMP wchar_t** __cdecl __p__wpgmptr(); #define _environ (*__p__environ()) #define _wenviron (*__p__wenviron()) #define _pgmptr (*__p__pgmptr()) #define _wpgmptr (*__p__wpgmptr()) #endif /* !defined(_M_CEE_PURE) */ errno_t __cdecl _get_pgmptr(_Deref_out_z_ char ** _Value); errno_t __cdecl _get_wpgmptr(_Deref_out_z_ wchar_t ** _Value); #if !defined(_M_CEE_PURE) _CRT_INSECURE_DEPRECATE_GLOBALS(_get_fmode) _CRTIMP extern int _fmode; /* default file translation mode */ #else _CRTIMP int* __cdecl __p__fmode(); #define _fmode (*__p__fmode()) #endif /* !defined(_M_CEE_PURE) */ _CRTIMP errno_t __cdecl _set_fmode(_In_ int _Mode); _CRTIMP errno_t __cdecl _get_fmode(_Out_ int * _PMode); /* _countof helper */ #if !defined(_countof) #if !defined(__cplusplus) #define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0])) #else extern "C++" { template char (*__countof_helper(UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray]; #define _countof(_Array) sizeof(*__countof_helper(_Array)) } #endif #endif /* function prototypes */ #ifndef _CRT_TERMINATE_DEFINED #define _CRT_TERMINATE_DEFINED _CRTIMP __declspec(noreturn) void __cdecl exit(_In_ int _Code); _CRTIMP __declspec(noreturn) void __cdecl _exit(_In_ int _Code); _CRTIMP void __cdecl abort(void); #endif _CRTIMP unsigned int __cdecl _set_abort_behavior(_In_ unsigned int _Flags, _In_ unsigned int _Mask); #ifndef _CRT_ABS_DEFINED #define _CRT_ABS_DEFINED int __cdecl abs(_In_ int _X); long __cdecl labs(_In_ long _X); #endif __int64 __cdecl _abs64(__int64); #if _MSC_VER >= 1400 && defined(_M_CEE) #pragma warning (suppress: 4985) _Check_return_ int __clrcall _atexit_m_appdomain(_In_opt_ void (__clrcall * _Func)(void)); #if defined(_M_CEE_MIXED) #pragma warning (suppress: 4985) _Check_return_ int __clrcall _atexit_m(_In_opt_ void (__clrcall * _Func)(void)); #else _Check_return_ inline int __clrcall _atexit_m(_In_opt_ void (__clrcall *_Function)(void)) #pragma warning (suppress: 4985) { return _atexit_m_appdomain(_Function); } #endif #endif #if defined(_M_CEE_PURE) /* In pure mode, atexit is the same as atexit_m_appdomain */ extern "C++" { inline int __clrcall atexit ( void (__clrcall *_Function)(void) ) { return _atexit_m_appdomain(_Function); } } #else int __cdecl atexit(void (__cdecl *)(void)); #endif #ifndef _CRT_ATOF_DEFINED #define _CRT_ATOF_DEFINED _Check_return_ _CRTIMP double __cdecl atof(_In_z_ const char *_String); _Check_return_ _CRTIMP double __cdecl _atof_l(_In_z_ const char *_String, _In_opt_ _locale_t _Locale); #endif _Check_return_ _CRTIMP _CRT_JIT_INTRINSIC int __cdecl atoi(_In_z_ const char *_Str); _Check_return_ _CRTIMP int __cdecl _atoi_l(_In_z_ const char *_Str, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP long __cdecl atol(_In_z_ const char *_Str); _Check_return_ _CRTIMP long __cdecl _atol_l(_In_z_ const char *_Str, _In_opt_ _locale_t _Locale); #ifndef _CRT_ALGO_DEFINED #define _CRT_ALGO_DEFINED #if __STDC_WANT_SECURE_LIB__ _Check_return_ _CRTIMP void * __cdecl bsearch_s(_In_ const void * _Key, _In_bytecount_x_(_NumOfElements * _SizeOfElements) const void * _Base, _In_ rsize_t _NumOfElements, _In_ rsize_t _SizeOfElements, _In_ int (__cdecl * _PtFuncCompare)(void *, const void *, const void *), void * _Context); #endif _Check_return_ _CRTIMP void * __cdecl bsearch(_In_ const void * _Key, _In_bytecount_x_(_NumOfElements * _SizeOfElements) const void * _Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int (__cdecl * _PtFuncCompare)(const void *, const void *)); #if __STDC_WANT_SECURE_LIB__ _CRTIMP void __cdecl qsort_s(_Inout_bytecap_x_(_NumOfElements* _SizeOfElements) void * _Base, _In_ rsize_t _NumOfElements, _In_ rsize_t _SizeOfElements, _In_ int (__cdecl * _PtFuncCompare)(void *, const void *, const void *), void *_Context); #endif _CRTIMP void __cdecl qsort(_Inout_bytecap_x_(_NumOfElements * _SizeOfElements) void * _Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int (__cdecl * _PtFuncCompare)(const void *, const void *)); #endif _Check_return_ unsigned short __cdecl _byteswap_ushort(_In_ unsigned short _Short); _Check_return_ unsigned long __cdecl _byteswap_ulong (_In_ unsigned long _Long); _Check_return_ unsigned __int64 __cdecl _byteswap_uint64(_In_ unsigned __int64 _Int64); _Check_return_ _CRTIMP div_t __cdecl div(_In_ int _Numerator, _In_ int _Denominator); _Check_return_ _CRTIMP _CRT_INSECURE_DEPRECATE(_dupenv_s) char * __cdecl getenv(_In_z_ const char * _VarName); #if __STDC_WANT_SECURE_LIB__ _Check_return_opt_ _CRTIMP errno_t __cdecl getenv_s(_Out_ size_t * _ReturnSize, _Out_z_cap_(_DstSize) char * _DstBuf, _In_ rsize_t _DstSize, _In_z_ const char * _VarName); #endif __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(errno_t, getenv_s, _Out_ size_t *, _ReturnSize, char, _Dest, _In_z_ const char *, _VarName) #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) #pragma push_macro("_dupenv_s") #undef _dupenv_s #endif _Check_return_opt_ _CRTIMP errno_t __cdecl _dupenv_s(_Out_ _Deref_post_opt_z_cap_(*_PBufferSizeInBytes) char **_PBuffer, _Out_opt_ size_t * _PBufferSizeInBytes, _In_z_ const char * _VarName); #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) #pragma pop_macro("_dupenv_s") #endif _Check_return_opt_ _CRTIMP errno_t __cdecl _itoa_s(_In_ int _Value, _Out_z_cap_(_Size) char * _DstBuf, _In_ size_t _Size, _In_ int _Radix); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(errno_t, _itoa_s, _In_ int, _Value, char, _Dest, _In_ int, _Radix) __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(char *, __RETURN_POLICY_DST, _CRTIMP, _itoa, _In_ int, _Value, _Pre_notnull_ _Post_z_, char, _Dest, _In_ int, _Radix) _Check_return_opt_ _CRTIMP errno_t __cdecl _i64toa_s(_In_ __int64 _Val, _Out_z_cap_(_Size) char * _DstBuf, _In_ size_t _Size, _In_ int _Radix); _CRTIMP _CRT_INSECURE_DEPRECATE(_i64toa_s) char * __cdecl _i64toa(_In_ __int64 _Val, _Pre_notnull_ _Post_z_ char * _DstBuf, _In_ int _Radix); _Check_return_opt_ _CRTIMP errno_t __cdecl _ui64toa_s(_In_ unsigned __int64 _Val, _Out_z_cap_(_Size) char * _DstBuf, _In_ size_t _Size, _In_ int _Radix); _CRTIMP _CRT_INSECURE_DEPRECATE(_ui64toa_s) char * __cdecl _ui64toa(_In_ unsigned __int64 _Val, _Pre_notnull_ _Post_z_ char * _DstBuf, _In_ int _Radix); _Check_return_ _CRTIMP __int64 __cdecl _atoi64(_In_z_ const char * _String); _Check_return_ _CRTIMP __int64 __cdecl _atoi64_l(_In_z_ const char * _String, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP __int64 __cdecl _strtoi64(_In_z_ const char * _String, _Out_opt_ _Deref_post_z_ char ** _EndPtr, _In_ int _Radix); _Check_return_ _CRTIMP __int64 __cdecl _strtoi64_l(_In_z_ const char * _String, _Out_opt_ _Deref_post_z_ char ** _EndPtr, _In_ int _Radix, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP unsigned __int64 __cdecl _strtoui64(_In_z_ const char * _String, _Out_opt_ _Deref_post_z_ char ** _EndPtr, _In_ int _Radix); _Check_return_ _CRTIMP unsigned __int64 __cdecl _strtoui64_l(_In_z_ const char * _String, _Out_opt_ _Deref_post_z_ char ** _EndPtr, _In_ int _Radix, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP ldiv_t __cdecl ldiv(_In_ long _Numerator, _In_ long _Denominator); #ifdef __cplusplus extern "C++" { inline ldiv_t div(_In_ long _A1, _In_ long _A2) { return ldiv(_A1, _A2); } } #endif _Check_return_opt_ _CRTIMP errno_t __cdecl _ltoa_s(_In_ long _Val, _Out_z_cap_(_Size) char * _DstBuf, _In_ size_t _Size, _In_ int _Radix); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(errno_t, _ltoa_s, _In_ long, _Value, char, _Dest, _In_ int, _Radix) __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(char *, __RETURN_POLICY_DST, _CRTIMP, _ltoa, _In_ long, _Value, _Pre_notnull_ _Post_z_, char, _Dest, _In_ int, _Radix) _Check_return_ _CRTIMP int __cdecl mblen(_In_opt_bytecount_(_MaxCount) _Pre_opt_z_ const char * _Ch, _In_ size_t _MaxCount); _Check_return_ _CRTIMP int __cdecl _mblen_l(_In_opt_bytecount_(_MaxCount) _Pre_opt_z_ const char * _Ch, _In_ size_t _MaxCount, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP size_t __cdecl _mbstrlen(_In_z_ const char * _Str); _Check_return_ _CRTIMP size_t __cdecl _mbstrlen_l(_In_z_ const char *_Str, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP size_t __cdecl _mbstrnlen(_In_z_ const char *_Str, _In_ size_t _MaxCount); _Check_return_ _CRTIMP size_t __cdecl _mbstrnlen_l(_In_z_ const char *_Str, _In_ size_t _MaxCount, _In_opt_ _locale_t _Locale); _CRTIMP int __cdecl mbtowc(_Pre_notnull_ _Post_z_ wchar_t * _DstCh, _In_opt_bytecount_(_SrcSizeInBytes) _Pre_opt_z_ const char * _SrcCh, _In_ size_t _SrcSizeInBytes); _CRTIMP int __cdecl _mbtowc_l(_Pre_notnull_ _Post_z_ wchar_t * _DstCh, _In_opt_bytecount_(_SrcSizeInBytes) _Pre_opt_z_ const char * _SrcCh, _In_ size_t _SrcSizeInBytes, _In_opt_ _locale_t _Locale); _Check_return_opt_ _CRTIMP errno_t __cdecl mbstowcs_s(_Out_opt_ size_t * _PtNumOfCharConverted, _Out_opt_cap_post_count_(_SizeInWords, *_PtNumOfCharConverted) wchar_t * _DstBuf, _In_ size_t _SizeInWords, _In_count_(_MaxCount) _Pre_z_ const char * _SrcBuf, _In_ size_t _MaxCount ); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_2(errno_t, mbstowcs_s, _Out_opt_ size_t *, _PtNumOfCharConverted, _Deref_post_z_ wchar_t, _Dest, _In_z_ const char *, _Source, _In_ size_t, _MaxCount) __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE(_CRTIMP, mbstowcs, _Out_opt_z_cap_(_MaxCount), wchar_t, _Dest, _In_z_ const char *, _Source, _In_ size_t, _MaxCount) _Check_return_opt_ _CRTIMP errno_t __cdecl _mbstowcs_s_l(_Out_opt_ size_t * _PtNumOfCharConverted, _Out_opt_cap_post_count_(_SizeInWords, *_PtNumOfCharConverted) wchar_t * _DstBuf, _In_ size_t _SizeInWords, _In_count_(_MaxCount) _Pre_z_ const char * _SrcBuf, _In_ size_t _MaxCount, _In_opt_ _locale_t _Locale); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_3(errno_t, _mbstowcs_s_l, _Out_opt_ size_t *, _PtNumOfCharConverted, wchar_t, _Dest, _In_z_ const char *, _Source, _In_ size_t, _MaxCount, _In_opt_ _locale_t, _Locale) __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_3_SIZE_EX(_CRTIMP, _mbstowcs_l, _mbstowcs_s_l, _Out_opt_z_cap_(_Size) wchar_t, _Out_z_cap_(_MaxCount), wchar_t, _Dest, _In_z_ const char *, _Source, _In_ size_t, _MaxCount, _In_opt_ _locale_t, _Locale) _Check_return_ _CRTIMP int __cdecl rand(void); #if defined(_CRT_RAND_S) _CRTIMP errno_t __cdecl rand_s ( _Out_ unsigned int *_RandomValue); #endif _Check_return_opt_ _CRTIMP int __cdecl _set_error_mode(_In_ int _Mode); _CRTIMP void __cdecl srand(_In_ unsigned int _Seed); _Check_return_ _CRTIMP double __cdecl strtod(_In_z_ const char * _Str, _Out_opt_ _Deref_post_z_ char ** _EndPtr); _Check_return_ _CRTIMP double __cdecl _strtod_l(_In_z_ const char * _Str, _Out_opt_ _Deref_post_z_ char ** _EndPtr, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP long __cdecl strtol(_In_z_ const char * _Str, _Out_opt_ _Deref_post_z_ char ** _EndPtr, _In_ int _Radix ); _Check_return_ _CRTIMP long __cdecl _strtol_l(_In_z_ const char *_Str, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP unsigned long __cdecl strtoul(_In_z_ const char * _Str, _Out_opt_ _Deref_post_z_ char ** _EndPtr, _In_ int _Radix); _Check_return_ _CRTIMP unsigned long __cdecl _strtoul_l(const char * _Str, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix, _In_opt_ _locale_t _Locale); #ifndef _CRT_SYSTEM_DEFINED #define _CRT_SYSTEM_DEFINED _CRTIMP int __cdecl system(_In_opt_z_ const char * _Command); #endif _Check_return_opt_ _CRTIMP errno_t __cdecl _ultoa_s(_In_ unsigned long _Val, _Out_z_cap_(_Size) char * _DstBuf, _In_ size_t _Size, _In_ int _Radix); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(errno_t, _ultoa_s, _In_ unsigned long, _Value, char, _Dest, _In_ int, _Radix) __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(char *, __RETURN_POLICY_DST, _CRTIMP, _ultoa, _In_ unsigned long, _Value, _Pre_notnull_ _Post_z_, char, _Dest, _In_ int, _Radix) _CRTIMP _CRT_INSECURE_DEPRECATE(wctomb_s) int __cdecl wctomb(_Out_opt_z_bytecap_c_(MB_LEN_MAX) char * _MbCh, _In_ wchar_t _WCh); _CRTIMP _CRT_INSECURE_DEPRECATE(_wctomb_s_l) int __cdecl _wctomb_l(_Pre_maybenull_ _Post_z_ char * _MbCh, _In_ wchar_t _WCh, _In_opt_ _locale_t _Locale); #if __STDC_WANT_SECURE_LIB__ _Check_return_wat_ _CRTIMP errno_t __cdecl wctomb_s(_Out_opt_ int * _SizeConverted, _Out_opt_bytecap_post_bytecount_(_SizeInBytes, *_SizeConverted) char * _MbCh, _In_ rsize_t _SizeInBytes, _In_ wchar_t _WCh); #endif _Check_return_wat_ _CRTIMP errno_t __cdecl _wctomb_s_l(_Out_opt_ int * _SizeConverted, _Out_opt_z_bytecap_(_SizeInBytes) char * _MbCh, _In_ size_t _SizeInBytes, _In_ wchar_t _WCh, _In_opt_ _locale_t _Locale); _Check_return_wat_ _CRTIMP errno_t __cdecl wcstombs_s(_Out_opt_ size_t * _PtNumOfCharConverted, _Out_opt_bytecap_post_bytecount_(_DstSizeInBytes, *_PtNumOfCharConverted) char * _Dst, _In_ size_t _DstSizeInBytes, _In_z_ const wchar_t * _Src, _In_ size_t _MaxCountInBytes); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_2(errno_t, wcstombs_s, _Out_opt_ size_t *, _PtNumOfCharConverted, _Out_opt_bytecap_(_Size) char, _Dest, _In_z_ const wchar_t *, _Source, _In_ size_t, _MaxCount) __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE(_CRTIMP, wcstombs, _Out_opt_z_cap_(_MaxCount), char, _Dest, _In_z_ const wchar_t *, _Source, _In_ size_t, _MaxCount) _Check_return_wat_ _CRTIMP errno_t __cdecl _wcstombs_s_l(_Out_opt_ size_t * _PtNumOfCharConverted, _Out_opt_bytecap_post_bytecount_(_DstSizeInBytes, *_PtNumOfCharConverted) char * _Dst, _In_ size_t _DstSizeInBytes, _In_z_ const wchar_t * _Src, _In_ size_t _MaxCountInBytes, _In_opt_ _locale_t _Locale); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_3(errno_t, _wcstombs_s_l, _Out_opt_ size_t *,_PtNumOfCharConverted, _Out_opt_cap_(_Size) char, _Dest, _In_z_ const wchar_t *, _Source, _In_ size_t, _MaxCount, _In_opt_ _locale_t, _Locale) __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_3_SIZE_EX(_CRTIMP, _wcstombs_l, _wcstombs_s_l, _Out_opt_z_cap_(_Size) char, _Out_z_cap_(_MaxCount), char, _Dest, _In_z_ const wchar_t *, _Source, _In_ size_t, _MaxCount, _In_opt_ _locale_t, _Locale) #if _MSC_VER >= 1400 && defined(__cplusplus) && defined(_M_CEE) /* * Managed search routines. Note __cplusplus, this is because we only support * managed C++. */ extern "C++" { #if __STDC_WANT_SECURE_LIB__ _Check_return_ void * __clrcall bsearch_s(_In_ const void * _Key, _In_bytecount_x_(_NumOfElements*_SizeOfElements) const void * _Base, _In_ rsize_t _NumOfElements, _In_ rsize_t _SizeOfElements, _In_ int (__clrcall * _PtFuncCompare)(void *, const void *, const void *), void * _Context); #endif _Check_return_ void * __clrcall bsearch (_In_ const void * _Key, _In_bytecount_x_(_NumOfElements*_SizeOfElements) const void * _Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int (__clrcall * _PtFuncCompare)(const void *, const void *)); #if __STDC_WANT_SECURE_LIB__ void __clrcall qsort_s(_Inout_bytecap_x_(_NumOfElements*_SizeOfElements) _Post_bytecount_x_(_NumOfElements*_SizeOfElements) void * _Base, _In_ rsize_t _NumOfElements, _In_ rsize_t _SizeOfElment, _In_ int (__clrcall * _PtFuncCompare)(void *, const void *, const void *), void * _Context); #endif void __clrcall qsort(_Inout_bytecap_x_(_NumOfElements*_SizeOfElements) _Post_bytecount_x_(_NumOfElements*_SizeOfElements) void * _Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int (__clrcall * _PtFuncCompare)(const void *, const void *)); } #endif #ifndef _CRT_ALLOCATION_DEFINED #define _CRT_ALLOCATION_DEFINED #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) #pragma push_macro("calloc") #pragma push_macro("free") #pragma push_macro("malloc") #pragma push_macro("realloc") #pragma push_macro("_recalloc") #pragma push_macro("_aligned_free") #pragma push_macro("_aligned_malloc") #pragma push_macro("_aligned_offset_malloc") #pragma push_macro("_aligned_realloc") #pragma push_macro("_aligned_recalloc") #pragma push_macro("_aligned_offset_realloc") #pragma push_macro("_aligned_offset_recalloc") #pragma push_macro("_aligned_msize") #undef calloc #undef free #undef malloc #undef realloc #undef _recalloc #undef _aligned_free #undef _aligned_malloc #undef _aligned_offset_malloc #undef _aligned_realloc #undef _aligned_recalloc #undef _aligned_offset_realloc #undef _aligned_offset_recalloc #undef _aligned_msize #endif _Check_return_ _Ret_opt_bytecap_x_(_NumOfElements* _SizeOfElements) _CRTIMP _CRT_JIT_INTRINSIC _CRTNOALIAS _CRTRESTRICT void * __cdecl calloc(_In_ size_t _NumOfElements, _In_ size_t _SizeOfElements); _CRTIMP _CRTNOALIAS void __cdecl free(_Inout_opt_ void * _Memory); _Check_return_ _Ret_opt_bytecap_(_Size) _CRTIMP _CRT_JIT_INTRINSIC _CRTNOALIAS _CRTRESTRICT void * __cdecl malloc(_In_ size_t _Size); _Check_return_ _Ret_opt_bytecap_(_NewSize) _CRTIMP _CRTNOALIAS _CRTRESTRICT void * __cdecl realloc(_In_opt_ void * _Memory, _In_ size_t _NewSize); _Check_return_ _Ret_opt_bytecap_x_(_Count*_Size) _CRTIMP _CRTNOALIAS _CRTRESTRICT void * __cdecl _recalloc(_In_opt_ void * _Memory, _In_ size_t _Count, _In_ size_t _Size); _CRTIMP _CRTNOALIAS void __cdecl _aligned_free(_Inout_opt_ void * _Memory); _Check_return_ _Ret_opt_bytecap_(_Size) _CRTIMP _CRTNOALIAS _CRTRESTRICT void * __cdecl _aligned_malloc(_In_ size_t _Size, _In_ size_t _Alignment); _Check_return_ _Ret_opt_bytecap_(_Size) _CRTIMP _CRTNOALIAS _CRTRESTRICT void * __cdecl _aligned_offset_malloc(_In_ size_t _Size, _In_ size_t _Alignment, _In_ size_t _Offset); _Check_return_ _Ret_opt_bytecap_(_NewSize) _CRTIMP _CRTNOALIAS _CRTRESTRICT void * __cdecl _aligned_realloc(_In_opt_ void * _Memory, _In_ size_t _NewSize, _In_ size_t _Alignment); _Check_return_ _Ret_opt_bytecap_x_(_Count*_Size) _CRTIMP _CRTNOALIAS _CRTRESTRICT void * __cdecl _aligned_recalloc(_In_opt_ void * _Memory, _In_ size_t _Count, _In_ size_t _Size, _In_ size_t _Alignment); _Check_return_ _Ret_opt_bytecap_(_NewSize) _CRTIMP _CRTNOALIAS _CRTRESTRICT void * __cdecl _aligned_offset_realloc(_In_opt_ void * _Memory, _In_ size_t _NewSize, _In_ size_t _Alignment, _In_ size_t _Offset); _Check_return_ _Ret_opt_bytecap_x_(_Count*_Size) _CRTIMP _CRTNOALIAS _CRTRESTRICT void * __cdecl _aligned_offset_recalloc(_In_opt_ void * _Memory, _In_ size_t _Count, _In_ size_t _Size, _In_ size_t _Alignment, _In_ size_t _Offset); _Check_return_ _CRTIMP size_t __cdecl _aligned_msize(_In_ void * _Memory, _In_ size_t _Alignment, _In_ size_t _Offset); #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) #pragma pop_macro("_aligned_msize") #pragma pop_macro("_aligned_offset_recalloc") #pragma pop_macro("_aligned_offset_realloc") #pragma pop_macro("_aligned_recalloc") #pragma pop_macro("_aligned_realloc") #pragma pop_macro("_aligned_offset_malloc") #pragma pop_macro("_aligned_malloc") #pragma pop_macro("_aligned_free") #pragma pop_macro("_recalloc") #pragma pop_macro("realloc") #pragma pop_macro("malloc") #pragma pop_macro("free") #pragma pop_macro("calloc") #endif #endif /*_CRT_ALLOCATION_DEFINED */ #ifndef _WSTDLIB_DEFINED /* wide function prototypes, also declared in wchar.h */ _Check_return_wat_ _CRTIMP errno_t __cdecl _itow_s (_In_ int _Val, _Out_z_cap_(_SizeInWords) wchar_t * _DstBuf, _In_ size_t _SizeInWords, _In_ int _Radix); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(errno_t, _itow_s, _In_ int, _Value, wchar_t, _Dest, _In_ int, _Radix) __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(wchar_t *, __RETURN_POLICY_DST, _CRTIMP, _itow, _In_ int, _Value, _Pre_notnull_ _Post_z_, wchar_t, _Dest, _In_ int, _Radix) _Check_return_wat_ _CRTIMP errno_t __cdecl _ltow_s (_In_ long _Val, _Out_z_cap_(_SizeInWords) wchar_t * _DstBuf, _In_ size_t _SizeInWords, _In_ int _Radix); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(errno_t, _ltow_s, _In_ long, _Value, wchar_t, _Dest, _In_ int, _Radix) __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(wchar_t *, __RETURN_POLICY_DST, _CRTIMP, _ltow, _In_ long, _Value, _Pre_notnull_ _Post_z_, wchar_t, _Dest, _In_ int, _Radix) _Check_return_wat_ _CRTIMP errno_t __cdecl _ultow_s (_In_ unsigned long _Val, _Out_z_cap_(_SizeInWords) wchar_t * _DstBuf, _In_ size_t _SizeInWords, _In_ int _Radix); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(errno_t, _ultow_s, _In_ unsigned long, _Value, wchar_t, _Dest, _In_ int, _Radix) __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(wchar_t *, __RETURN_POLICY_DST, _CRTIMP, _ultow, _In_ unsigned long, _Value, _Pre_notnull_ _Post_z_, wchar_t, _Dest, _In_ int, _Radix) _Check_return_ _CRTIMP double __cdecl wcstod(_In_z_ const wchar_t * _Str, _Out_opt_ _Deref_post_z_ wchar_t ** _EndPtr); _Check_return_ _CRTIMP double __cdecl _wcstod_l(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t ** _EndPtr, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t ** _EndPtr, int _Radix); _Check_return_ _CRTIMP long __cdecl _wcstol_l(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, int _Radix, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t ** _EndPtr, int _Radix); _Check_return_ _CRTIMP unsigned long __cdecl _wcstoul_l(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, int _Radix, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP _CRT_INSECURE_DEPRECATE(_wdupenv_s) wchar_t * __cdecl _wgetenv(_In_z_ const wchar_t * _VarName); _Check_return_wat_ _CRTIMP errno_t __cdecl _wgetenv_s(_Out_ size_t * _ReturnSize, _Out_z_cap_(_DstSizeInWords) wchar_t * _DstBuf, _In_ size_t _DstSizeInWords, _In_z_ const wchar_t * _VarName); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(errno_t, _wgetenv_s, _Out_ size_t *, _ReturnSize, wchar_t, _Dest, _In_z_ const wchar_t *, _VarName) #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) #pragma push_macro("_wdupenv_s") #undef _wdupenv_s #endif _Check_return_wat_ _CRTIMP errno_t __cdecl _wdupenv_s(_Out_ _Deref_post_opt_z_cap_(*_BufferSizeInWords) wchar_t **_Buffer, _Out_opt_ size_t *_BufferSizeInWords, _In_z_ const wchar_t *_VarName); #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) #pragma pop_macro("_wdupenv_s") #endif #ifndef _CRT_WSYSTEM_DEFINED #define _CRT_WSYSTEM_DEFINED _CRTIMP int __cdecl _wsystem(_In_opt_z_ const wchar_t * _Command); #endif _Check_return_ _CRTIMP double __cdecl _wtof(_In_z_ const wchar_t *_Str); _Check_return_ _CRTIMP double __cdecl _wtof_l(_In_z_ const wchar_t *_Str, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str); _Check_return_ _CRTIMP int __cdecl _wtoi_l(_In_z_ const wchar_t *_Str, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP long __cdecl _wtol(_In_z_ const wchar_t *_Str); _Check_return_ _CRTIMP long __cdecl _wtol_l(_In_z_ const wchar_t *_Str, _In_opt_ _locale_t _Locale); _Check_return_wat_ _CRTIMP errno_t __cdecl _i64tow_s(_In_ __int64 _Val, _Out_z_cap_(_SizeInWords) wchar_t * _DstBuf, _In_ size_t _SizeInWords, _In_ int _Radix); _CRTIMP _CRT_INSECURE_DEPRECATE(_i64tow_s) wchar_t * __cdecl _i64tow(_In_ __int64 _Val, _Pre_notnull_ _Post_z_ wchar_t * _DstBuf, _In_ int _Radix); _Check_return_wat_ _CRTIMP errno_t __cdecl _ui64tow_s(_In_ unsigned __int64 _Val, _Out_z_cap_(_SizeInWords) wchar_t * _DstBuf, _In_ size_t _SizeInWords, _In_ int _Radix); _CRTIMP _CRT_INSECURE_DEPRECATE(_ui64tow_s) wchar_t * __cdecl _ui64tow(_In_ unsigned __int64 _Val, _Pre_notnull_ _Post_z_ wchar_t * _DstBuf, _In_ int _Radix); _Check_return_ _CRTIMP __int64 __cdecl _wtoi64(_In_z_ const wchar_t *_Str); _Check_return_ _CRTIMP __int64 __cdecl _wtoi64_l(_In_z_ const wchar_t *_Str, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP __int64 __cdecl _wcstoi64(_In_z_ const wchar_t * _Str, _Out_opt_ _Deref_post_z_ wchar_t ** _EndPtr, _In_ int _Radix); _Check_return_ _CRTIMP __int64 __cdecl _wcstoi64_l(_In_z_ const wchar_t * _Str, _Out_opt_ _Deref_post_z_ wchar_t ** _EndPtr, _In_ int _Radix, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP unsigned __int64 __cdecl _wcstoui64(_In_z_ const wchar_t * _Str, _Out_opt_ _Deref_post_z_ wchar_t ** _EndPtr, _In_ int _Radix); _Check_return_ _CRTIMP unsigned __int64 __cdecl _wcstoui64_l(_In_z_ const wchar_t *_Str , _Out_opt_ _Deref_post_z_ wchar_t ** _EndPtr, _In_ int _Radix, _In_opt_ _locale_t _Locale); #define _WSTDLIB_DEFINED #endif #ifndef _POSIX_ /* Buffer size required to be passed to _gcvt, fcvt and other fp conversion routines */ #define _CVTBUFSIZE (309+40) /* # of digits in max. dp value + slop */ #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) #pragma push_macro("_fullpath") #undef _fullpath #endif _Check_return_ _CRTIMP char * __cdecl _fullpath(_Out_opt_z_cap_(_SizeInBytes) char * _FullPath, _In_z_ const char * _Path, _In_ size_t _SizeInBytes); #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) #pragma pop_macro("_fullpath") #endif _Check_return_wat_ _CRTIMP errno_t __cdecl _ecvt_s(_Out_z_cap_(_Size) char * _DstBuf, _In_ size_t _Size, _In_ double _Val, _In_ int _NumOfDights, _Out_ int * _PtDec, _Out_ int * _PtSign); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_4(errno_t, _ecvt_s, char, _Dest, _In_ double, _Value, _In_ int, _NumOfDigits, _Out_ int *, _PtDec, _Out_ int *, _PtSign) _Check_return_ _CRTIMP _CRT_INSECURE_DEPRECATE(_ecvt_s) char * __cdecl _ecvt(_In_ double _Val, _In_ int _NumOfDigits, _Out_ int * _PtDec, _Out_ int * _PtSign); _Check_return_wat_ _CRTIMP errno_t __cdecl _fcvt_s(_Out_z_cap_(_Size) char * _DstBuf, _In_ size_t _Size, _In_ double _Val, _In_ int _NumOfDec, _Out_ int * _PtDec, _Out_ int * _PtSign); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_4(errno_t, _fcvt_s, char, _Dest, _In_ double, _Value, _In_ int, _NumOfDigits, _Out_ int *, _PtDec, _Out_ int *, _PtSign) _Check_return_ _CRTIMP _CRT_INSECURE_DEPRECATE(_fcvt_s) char * __cdecl _fcvt(_In_ double _Val, _In_ int _NumOfDec, _Out_ int * _PtDec, _Out_ int * _PtSign); _CRTIMP errno_t __cdecl _gcvt_s(_Out_z_cap_(_Size) char * _DstBuf, _In_ size_t _Size, _In_ double _Val, _In_ int _NumOfDigits); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(errno_t, _gcvt_s, char, _Dest, _In_ double, _Value, _In_ int, _NumOfDigits) _CRTIMP _CRT_INSECURE_DEPRECATE(_gcvt_s) char * __cdecl _gcvt(_In_ double _Val, _In_ int _NumOfDigits, _Pre_notnull_ _Post_z_ char * _DstBuf); _Check_return_ _CRTIMP int __cdecl _atodbl(_Out_ _CRT_DOUBLE * _Result, _In_z_ char * _Str); _Check_return_ _CRTIMP int __cdecl _atoldbl(_Out_ _LDOUBLE * _Result, _In_z_ char * _Str); _Check_return_ _CRTIMP int __cdecl _atoflt(_Out_ _CRT_FLOAT * _Result, _In_z_ char * _Str); _Check_return_ _CRTIMP int __cdecl _atodbl_l(_Out_ _CRT_DOUBLE * _Result, _In_z_ char * _Str, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP int __cdecl _atoldbl_l(_Out_ _LDOUBLE * _Result, _In_z_ char * _Str, _In_opt_ _locale_t _Locale); _Check_return_ _CRTIMP int __cdecl _atoflt_l(_Out_ _CRT_FLOAT * _Result, _In_z_ char * _Str, _In_opt_ _locale_t _Locale); _Check_return_ unsigned long __cdecl _lrotl(_In_ unsigned long _Val, _In_ int _Shift); _Check_return_ unsigned long __cdecl _lrotr(_In_ unsigned long _Val, _In_ int _Shift); _Check_return_wat_ _CRTIMP_ALTERNATIVE errno_t __cdecl _makepath_s(_Out_z_cap_(_SizeInWords) char * _PathResult, _In_ size_t _SizeInWords, _In_opt_z_ const char * _Drive, _In_opt_z_ const char * _Dir, _In_opt_z_ const char * _Filename, _In_opt_z_ const char * _Ext); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_4(errno_t, _makepath_s, char, _Path, _In_opt_z_ const char *, _Drive, _In_opt_z_ const char *, _Dir, _In_opt_z_ const char *, _Filename, _In_opt_z_ const char *, _Ext) __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_4(void, __RETURN_POLICY_VOID, _CRTIMP, _makepath, _Pre_notnull_ _Post_z_, char, _Path, _In_opt_z_ const char *, _Drive, _In_opt_z_ const char *, _Dir, _In_opt_z_ const char *, _Filename, _In_opt_z_ const char *, _Ext) #if _MSC_VER >= 1400 && defined(_M_CEE) _onexit_m_t __clrcall _onexit_m_appdomain(_onexit_m_t _Function); #if defined(_M_CEE_MIXED) _onexit_m_t __clrcall _onexit_m(_onexit_m_t _Function); #else inline _onexit_m_t __clrcall _onexit_m(_onexit_t _Function) { return _onexit_m_appdomain(_Function); } #endif #endif #if defined(_M_CEE_PURE) /* In pure mode, _onexit is the same as _onexit_m_appdomain */ extern "C++" { inline _onexit_t __clrcall _onexit ( _onexit_t _Function ) { return _onexit_m_appdomain(_Function); } } #else _onexit_t __cdecl _onexit(_In_opt_ _onexit_t _Func); #endif #ifndef _CRT_PERROR_DEFINED #define _CRT_PERROR_DEFINED _CRTIMP void __cdecl perror(_In_opt_z_ const char * _ErrMsg); #endif #pragma warning (push) #pragma warning (disable:6540) // the functions below have declspecs in their declarations in the windows headers, causing PREfast to fire 6540 here _Check_return_ _CRTIMP int __cdecl _putenv(_In_z_ const char * _EnvString); _Check_return_wat_ _CRTIMP errno_t __cdecl _putenv_s(_In_z_ const char * _Name, _In_z_ const char * _Value); _Check_return_ unsigned int __cdecl _rotl(_In_ unsigned int _Val, _In_ int _Shift); _Check_return_ unsigned __int64 __cdecl _rotl64(_In_ unsigned __int64 _Val, _In_ int _Shift); _Check_return_ unsigned int __cdecl _rotr(_In_ unsigned int _Val, _In_ int _Shift); _Check_return_ unsigned __int64 __cdecl _rotr64(_In_ unsigned __int64 _Val, _In_ int _Shift); #pragma warning (pop) _CRTIMP errno_t __cdecl _searchenv_s(_In_z_ const char * _Filename, _In_z_ const char * _EnvVar, _Out_z_cap_(_SizeInBytes) char * _ResultPath, _In_ size_t _SizeInBytes); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_2_0(errno_t, _searchenv_s, _In_z_ const char *, _Filename, _In_z_ const char *, _EnvVar, char, _ResultPath) __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_2_0(void, __RETURN_POLICY_VOID, _CRTIMP, _searchenv, _In_z_ const char *, _Filename, _In_z_ const char *, _EnvVar, _Pre_notnull_ _Post_z_, char, _ResultPath) _CRT_INSECURE_DEPRECATE(_splitpath_s) _CRTIMP void __cdecl _splitpath(_In_z_ const char * _FullPath, _Pre_maybenull_ _Post_z_ char * _Drive, _Pre_maybenull_ _Post_z_ char * _Dir, _Pre_maybenull_ _Post_z_ char * _Filename, _Pre_maybenull_ _Post_z_ char * _Ext); _Check_return_wat_ _CRTIMP_ALTERNATIVE errno_t __cdecl _splitpath_s(_In_z_ const char * _FullPath, _Out_opt_z_cap_(_DriveSize) char * _Drive, _In_ size_t _DriveSize, _Out_opt_z_cap_(_DirSize) char * _Dir, _In_ size_t _DirSize, _Out_opt_z_cap_(_FilenameSize) char * _Filename, _In_ size_t _FilenameSize, _Out_opt_z_cap_(_ExtSize) char * _Ext, _In_ size_t _ExtSize); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_SPLITPATH(errno_t, _splitpath_s, char, _Dest) _CRTIMP void __cdecl _swab(_Inout_cap_(_SizeInBytes) _Post_count_(_SizeInBytes) char * _Buf1, _Inout_cap_(_SizeInBytes) _Post_count_(_SizeInBytes) char * _Buf2, int _SizeInBytes); #ifndef _WSTDLIBP_DEFINED /* wide function prototypes, also declared in wchar.h */ #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) #pragma push_macro("_wfullpath") #undef _wfullpath #endif _Check_return_ _CRTIMP wchar_t * __cdecl _wfullpath(_Out_opt_z_cap_(_SizeInWords) wchar_t * _FullPath, _In_z_ const wchar_t * _Path, _In_ size_t _SizeInWords); #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) #pragma pop_macro("_wfullpath") #endif _Check_return_wat_ _CRTIMP_ALTERNATIVE errno_t __cdecl _wmakepath_s(_Out_z_cap_(_SIZE) wchar_t * _PathResult, _In_ size_t _SIZE, _In_opt_z_ const wchar_t * _Drive, _In_opt_z_ const wchar_t * _Dir, _In_opt_z_ const wchar_t * _Filename, _In_opt_z_ const wchar_t * _Ext); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_4(errno_t, _wmakepath_s, wchar_t, _ResultPath, _In_opt_z_ const wchar_t *, _Drive, _In_opt_z_ const wchar_t *, _Dir, _In_opt_z_ const wchar_t *, _Filename, _In_opt_z_ const wchar_t *, _Ext) __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_4(void, __RETURN_POLICY_VOID, _CRTIMP, _wmakepath, _Pre_notnull_ _Post_z_, wchar_t, _ResultPath, _In_opt_z_ const wchar_t *, _Drive, _In_opt_z_ const wchar_t *, _Dir, _In_opt_z_ const wchar_t *, _Filename, _In_opt_z_ const wchar_t *, _Ext) #ifndef _CRT_WPERROR_DEFINED #define _CRT_WPERROR_DEFINED _CRTIMP void __cdecl _wperror(_In_opt_z_ const wchar_t * _ErrMsg); #endif _Check_return_ _CRTIMP int __cdecl _wputenv(_In_z_ const wchar_t * _EnvString); _Check_return_wat_ _CRTIMP errno_t __cdecl _wputenv_s(_In_z_ const wchar_t * _Name, _In_z_ const wchar_t * _Value); _CRTIMP errno_t __cdecl _wsearchenv_s(_In_z_ const wchar_t * _Filename, _In_z_ const wchar_t * _EnvVar, _Out_z_cap_(_SizeInWords) wchar_t * _ResultPath, _In_ size_t _SizeInWords); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_2_0(errno_t, _wsearchenv_s, _In_z_ const wchar_t *, _Filename, _In_z_ const wchar_t *, _EnvVar, wchar_t, _ResultPath) __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_2_0(void, __RETURN_POLICY_VOID, _CRTIMP, _wsearchenv, _In_z_ const wchar_t *, _Filename, _In_z_ const wchar_t *, _EnvVar, _Pre_notnull_ _Post_z_, wchar_t, _ResultPath) _CRT_INSECURE_DEPRECATE(_wsplitpath_s) _CRTIMP void __cdecl _wsplitpath(_In_z_ const wchar_t * _FullPath, _Pre_maybenull_ _Post_z_ wchar_t * _Drive, _Pre_maybenull_ _Post_z_ wchar_t * _Dir, _Pre_maybenull_ _Post_z_ wchar_t * _Filename, _Pre_maybenull_ _Post_z_ wchar_t * _Ext); _CRTIMP_ALTERNATIVE errno_t __cdecl _wsplitpath_s(_In_z_ const wchar_t * _FullPath, _Out_opt_z_cap_(_DriveSize) wchar_t * _Drive, _In_ size_t _DriveSize, _Out_opt_z_cap_(_DirSize) wchar_t * _Dir, _In_ size_t _DirSize, _Out_opt_z_cap_(_FilenameSize) wchar_t * _Filename, _In_ size_t _FilenameSize, _Out_opt_z_cap_(_ExtSize) wchar_t * _Ext, _In_ size_t _ExtSize); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_SPLITPATH(errno_t, _wsplitpath_s, wchar_t, _Path) #define _WSTDLIBP_DEFINED #endif /* The Win32 API SetErrorMode, Beep and Sleep should be used instead. */ _CRT_OBSOLETE(SetErrorMode) _CRTIMP void __cdecl _seterrormode(_In_ int _Mode); _CRT_OBSOLETE(Beep) _CRTIMP void __cdecl _beep(_In_ unsigned _Frequency, _In_ unsigned _Duration); _CRT_OBSOLETE(Sleep) _CRTIMP void __cdecl _sleep(_In_ unsigned long _Duration); #endif /* _POSIX_ */ #if !__STDC__ #ifndef _POSIX_ /* Non-ANSI names for compatibility */ #ifndef __cplusplus #define max(a,b) (((a) > (b)) ? (a) : (b)) #define min(a,b) (((a) < (b)) ? (a) : (b)) #endif #define sys_errlist _sys_errlist #define sys_nerr _sys_nerr #define environ _environ #pragma warning(push) #pragma warning(disable: 4141) /* Using deprecated twice */ _Check_return_ _CRT_NONSTDC_DEPRECATE(_ecvt) _CRT_INSECURE_DEPRECATE(_ecvt_s) _CRTIMP char * __cdecl ecvt(_In_ double _Val, _In_ int _NumOfDigits, _Out_ int * _PtDec, _Out_ int * _PtSign); _Check_return_ _CRT_NONSTDC_DEPRECATE(_fcvt) _CRT_INSECURE_DEPRECATE(_fcvt_s) _CRTIMP char * __cdecl fcvt(_In_ double _Val, _In_ int _NumOfDec, _Out_ int * _PtDec, _Out_ int * _PtSign); _CRT_NONSTDC_DEPRECATE(_gcvt) _CRT_INSECURE_DEPRECATE(_fcvt_s) _CRTIMP char * __cdecl gcvt(_In_ double _Val, _In_ int _NumOfDigits, _Pre_notnull_ _Post_z_ char * _DstBuf); _CRT_NONSTDC_DEPRECATE(_itoa) _CRT_INSECURE_DEPRECATE(_itoa_s) _CRTIMP char * __cdecl itoa(_In_ int _Val, _Pre_notnull_ _Post_z_ char * _DstBuf, _In_ int _Radix); _CRT_NONSTDC_DEPRECATE(_ltoa) _CRT_INSECURE_DEPRECATE(_ltoa_s) _CRTIMP char * __cdecl ltoa(_In_ long _Val, _Pre_notnull_ _Post_z_ char * _DstBuf, _In_ int _Radix); _Check_return_ _CRT_NONSTDC_DEPRECATE(_putenv) _CRTIMP int __cdecl putenv(_In_z_ const char * _EnvString); _CRT_NONSTDC_DEPRECATE(_swab) _CRTIMP void __cdecl swab(_Inout_z_bytecap_(_SizeInBytes) char * _Buf1,_Inout_z_bytecap_(_SizeInBytes) char * _Buf2, _In_ int _SizeInBytes); _CRT_NONSTDC_DEPRECATE(_ultoa) _CRT_INSECURE_DEPRECATE(_ultoa_s) _CRTIMP char * __cdecl ultoa(_In_ unsigned long _Val, _Pre_notnull_ _Post_z_ char * _Dstbuf, _In_ int _Radix); #pragma warning(pop) onexit_t __cdecl onexit(_In_opt_ onexit_t _Func); #endif /* _POSIX_ */ #endif /* __STDC__ */ #ifdef __cplusplus } #endif #ifdef _MSC_VER #pragma pack(pop) #endif /* _MSC_VER */ #endif /* _INC_STDLIB */ From tracker at bugs.pypy.org Tue Sep 11 02:49:50 2012 From: tracker at bugs.pypy.org (Mark Roberts) Date: Tue, 11 Sep 2012 00:49:50 +0000 Subject: [pypy-issue] [issue1199] psycopg2ct 2.4.4 segmentation fault on Ubuntu 12.04 64-bit In-Reply-To: <1341163597.62.0.605992819875.issue1199@bugs.pypy.org> Message-ID: <1347324590.3.0.334334347041.issue1199@bugs.pypy.org> Mark Roberts added the comment: I am able to reproduce this. It appears to be fixed in the latest nightly build (pypy-c-jit-57259-1feab101071c-linux64) ---------- nosy: +wizzat status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 11 11:06:41 2012 From: tracker at bugs.pypy.org (Zooko) Date: Tue, 11 Sep 2012 09:06:41 +0000 Subject: [pypy-issue] [issue1258] Interrupted system call from os.urandom In-Reply-To: <1347354401.32.0.392307653813.issue1258@bugs.pypy.org> Message-ID: <1347354401.32.0.392307653813.issue1258@bugs.pypy.org> New submission from Zooko : This script has never done this under CPython, but just now I got this failure: MAIN zompu:~/playground/stringchain$ time PYTHONPATH=/usr/local/site-packages/pyutil-1.9.3_2-py2.7.egg/:/usr/local/site-packages/statprof-0.1.2-py2.7.egg pypy -OOu -c 'from stringchain.bench import bench; bench.slow_bench(profile=True)' N is the total number of bytes produced and consumed; results are in nanoseconds per byte (scientific notation) impl: StringChain task: accumulate_then_one_gulp N: 100000000Traceback (most recent call last): File "app_main.py", line 51, in run_toplevel File "app_main.py", line 575, in run_it File "", line 1, in File "stringchain/bench/bench.py", line 469, in slow_bench benchutil.rep_bench(task, BSIZE, initfunc=initfunc, UNITS_PER_SECOND=UNITS_PER_SECOND)#, profile=profile, profresultsfileobj=profresultsfileobj) File "/usr/local/stow/pypy-1.9/site-packages/pyutil-1.9.3_2-py2.7.egg/pyutil/benchutil.py", line 142, in rep_bench initfunc(n) File "stringchain/bench/bench.py", line 337, in init self.l.append(randstr(nextchunksize)) File "/usr/local/stow/pypy-1.9/site-packages/pyutil-1.9.3_2-py2.7.egg/pyutil/randutil.py", line 84, in insecurerandstr return os.urandom(n) File "/usr/local/stow/pypy-1.9/lib-python/2.7/os.py", line 756, in urandom bs += read(_urandomfd, n - len(bs)) OSError: [Errno 4] Interrupted system call real 0m14.677s user 0m1.703s sys 0m12.936s MAIN zompu:~/playground/stringchain$ time PYTHONPATH=/usr/local/site-packages/pyutil-1.9.3_2-py2.7.egg/:/usr/local/site-packages/statprof-0.1.2-py2.7.egg pypy -OOu -c 'from stringchain.bench import bench; bench.slow_bench(profile=True)' N is the total number of bytes produced and consumed; results are in nanoseconds per byte (scientific notation) impl: StringChain task: accumulate_then_one_gulp N: 100000000Traceback (most recent call last): File "app_main.py", line 51, in run_toplevel File "app_main.py", line 575, in run_it File "", line 1, in File "stringchain/bench/bench.py", line 469, in slow_bench benchutil.rep_bench(task, BSIZE, initfunc=initfunc, UNITS_PER_SECOND=UNITS_PER_SECOND)#, profile=profile, profresultsfileobj=profresultsfileobj) File "/usr/local/stow/pypy-1.9/site-packages/pyutil-1.9.3_2-py2.7.egg/pyutil/benchutil.py", line 142, in rep_bench initfunc(n) File "stringchain/bench/bench.py", line 337, in init self.l.append(randstr(nextchunksize)) File "/usr/local/stow/pypy-1.9/site-packages/pyutil-1.9.3_2-py2.7.egg/pyutil/randutil.py", line 84, in insecurerandstr return os.urandom(n) File "/usr/local/stow/pypy-1.9/lib-python/2.7/os.py", line 756, in urandom bs += read(_urandomfd, n - len(bs)) OSError: [Errno 4] Interrupted system call real 0m28.911s user 0m3.436s sys 0m25.242s It seems to take a different amount of time to fail each time I run it. I'm using statprof -- http://pypi.python.org/pypi/statprof/ -- which sets a timer signal -- which is probably part of the problem. ---------- messages: 4735 nosy: pypy-issue, zooko priority: bug status: unread title: Interrupted system call from os.urandom ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 11 11:40:22 2012 From: tracker at bugs.pypy.org (David) Date: Tue, 11 Sep 2012 09:40:22 +0000 Subject: [pypy-issue] [issue1259] module __file__ attribute shows wrong path In-Reply-To: <1347356422.5.0.518215816362.issue1259@bugs.pypy.org> Message-ID: <1347356422.5.0.518215816362.issue1259@bugs.pypy.org> New submission from David : The __file__ attribute for some modules shows a path corresponding to the system where pypy was translated and not where it is running. This causes one of the module/math app-level tests that use this attribute to load the math_testcases.txt file to fail, if the test are run on a different machine as the one used for translation. Examples: >>>> import math; math.__file__ '/Users/pypy/buildslave/pypy-c-jit-macosx-x86-64/build/pypy/module/math' or >>>> import abc; abc.__file__ '/Users/pypy/buildslave/pypy-c-jit-macosx-x86-64/build/lib-python/2.7/abc.py' In other cases, like ctypes, the behavior is as expected, e.g.: >>>> import ctypes; ctypes.__file__ '/opt/pypy/lib-python/2.7/ctypes/__init__.pyc' ---------- messages: 4736 nosy: bivab, pypy-issue priority: bug status: unread title: module __file__ attribute shows wrong path ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 11 12:02:54 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Tue, 11 Sep 2012 10:02:54 +0000 Subject: [pypy-issue] [issue1259] module __file__ attribute shows wrong path In-Reply-To: <1347356422.5.0.518215816362.issue1259@bugs.pypy.org> Message-ID: <1347357774.36.0.616660652573.issue1259@bugs.pypy.org> Armin Rigo added the comment: "math" should maybe not have a __file__ attribute at all (it doesn't in CPython). "abc" has a broken __file__ attribute probably coming from a .pyc file? But I don't understand why there would be a pyc file in the tarball... ---------- nosy: +arigo status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 11 13:25:28 2012 From: tracker at bugs.pypy.org (David) Date: Tue, 11 Sep 2012 11:25:28 +0000 Subject: [pypy-issue] [issue1259] module __file__ attribute shows wrong path In-Reply-To: <1347356422.5.0.518215816362.issue1259@bugs.pypy.org> Message-ID: <1347362728.55.0.209241283563.issue1259@bugs.pypy.org> David added the comment: For "abc" this also happens when placing the pypy-c binary in a clean checkout and starting it there. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 11 18:18:30 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Tue, 11 Sep 2012 16:18:30 +0000 Subject: [pypy-issue] [issue1259] module __file__ attribute shows wrong path In-Reply-To: <1347356422.5.0.518215816362.issue1259@bugs.pypy.org> Message-ID: <1347380310.66.0.612421135206.issue1259@bugs.pypy.org> Amaury Forgeot d Arc added the comment: "abc.py" is imported before the ObjSpace is frozen; the whole module is probably a prebuilt constant. ---------- nosy: +afa ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 11 18:54:47 2012 From: tracker at bugs.pypy.org (mattip) Date: Tue, 11 Sep 2012 16:54:47 +0000 Subject: [pypy-issue] [issue1258] Interrupted system call from os.urandom In-Reply-To: <1347354401.32.0.392307653813.issue1258@bugs.pypy.org> Message-ID: <1347382487.04.0.583840539628.issue1258@bugs.pypy.org> mattip added the comment: usually one needs to reinstall all site-packages into the untarred or unzipped pypy, in general you cannot use the /usr/local/site-packages from cpython for pypy. ---------- nosy: +mattip status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 11 19:03:19 2012 From: tracker at bugs.pypy.org (Zooko) Date: Tue, 11 Sep 2012 17:03:19 +0000 Subject: [pypy-issue] [issue1258] Interrupted system call from os.urandom In-Reply-To: <1347354401.32.0.392307653813.issue1258@bugs.pypy.org> Message-ID: <1347382999.97.0.426088690515.issue1258@bugs.pypy.org> Zooko added the comment: All of the Python code was installed specifically for Pypy. There are no CPython packages being imported. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 11 20:48:49 2012 From: tracker at bugs.pypy.org (mattip) Date: Tue, 11 Sep 2012 18:48:49 +0000 Subject: [pypy-issue] [issue1258] Interrupted system call from os.urandom In-Reply-To: <1347354401.32.0.392307653813.issue1258@bugs.pypy.org> Message-ID: <1347389329.59.0.419430511088.issue1258@bugs.pypy.org> mattip added the comment: help me reproduce the problem, here is what I have so far, starting from last night's 32 bit linux pypy $ virtualenv -p pypy-c-jit-57259-1feab101071c-linux/bin/pypy pypy_for_stringchains $ pypy_for_stringchains/bin/pip install statprof $ pypy_for_stringchains/bin/pip install pyutil $ pypy_for_stringchains/bin/pip install stringchain $ time pypy_for_stringchains/bin/pypy -OOu -c 'from stringchain.bench import bench; bench.slow_bench(profile=True)' output from the last command is Traceback (most recent call last): File "app_main.py", line 51, in run_toplevel File "app_main.py", line 546, in run_it File "", line 1, in TypeError: slow_bench() takes no arguments (1 given) ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 11 20:54:16 2012 From: tracker at bugs.pypy.org (Zooko) Date: Tue, 11 Sep 2012 18:54:16 +0000 Subject: [pypy-issue] [issue1258] Interrupted system call from os.urandom In-Reply-To: <1347354401.32.0.392307653813.issue1258@bugs.pypy.org> Message-ID: <1347389656.02.0.341191819955.issue1258@bugs.pypy.org> Zooko added the comment: Okay, I'll get back to you. If you want to try a stab at isolating what I suspect is the problem, just use statprof and do something like this: import statprof statprof.start() while True: os.urandom(32) But I'll get back to you with instructions to reproduce the exact software I have here, once I package it up and upload it to PyPI... ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 11 20:58:55 2012 From: tracker at bugs.pypy.org (mattip) Date: Tue, 11 Sep 2012 18:58:55 +0000 Subject: [pypy-issue] [issue1258] Interrupted system call from os.urandom In-Reply-To: <1347354401.32.0.392307653813.issue1258@bugs.pypy.org> Message-ID: <1347389935.94.0.745913116364.issue1258@bugs.pypy.org> mattip added the comment: indeed, the 4 line test crashes for me too. Much simpler :) ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 11 21:01:45 2012 From: tracker at bugs.pypy.org (Zooko) Date: Tue, 11 Sep 2012 19:01:45 +0000 Subject: [pypy-issue] [issue1258] Interrupted system call from os.urandom In-Reply-To: <1347354401.32.0.392307653813.issue1258@bugs.pypy.org> Message-ID: <1347390105.87.0.592012512819.issue1258@bugs.pypy.org> Zooko added the comment: Great! Thanks. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 11 23:00:46 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Tue, 11 Sep 2012 21:00:46 +0000 Subject: [pypy-issue] [issue1258] Interrupted system call from os.urandom In-Reply-To: <1347354401.32.0.392307653813.issue1258@bugs.pypy.org> Message-ID: <1347397246.27.0.613304377851.issue1258@bugs.pypy.org> Amaury Forgeot d Arc added the comment: The script fails consistently for me with CPython 2.7.2, and seems to pass with 2.7.3. The difference is that os.urandom() has been rewritten: it's now a builtin function, but more importantly it correctly handles EINTR and retries. PyPy has just been updated to version 2.7.3, and this version runs the script without failure (during at least 1 minute). ---------- nosy: +afa status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Sep 12 01:38:48 2012 From: tracker at bugs.pypy.org (Julian Berman) Date: Tue, 11 Sep 2012 23:38:48 +0000 Subject: [pypy-issue] [issue1260] sys.exc_info not being set before entering a context manager's __exit__ In-Reply-To: <1347406728.03.0.619393304673.issue1260@bugs.pypy.org> Message-ID: <1347406728.03.0.619393304673.issue1260@bugs.pypy.org> New submission from Julian Berman : The following code raises a KeyboardInterrupt on CPython but a TypeError on PyPy (1.9.0): class Foo(object): def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): if exc_type == KeyboardInterrupt: raise with Foo(): raise KeyboardInterrupt() ---------- messages: 4747 nosy: Julian, pypy-issue priority: bug status: unread title: sys.exc_info not being set before entering a context manager's __exit__ ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Sep 12 07:58:01 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Wed, 12 Sep 2012 05:58:01 +0000 Subject: [pypy-issue] [issue1260] sys.exc_info not being set before entering a context manager's __exit__ In-Reply-To: <1347406728.03.0.619393304673.issue1260@bugs.pypy.org> Message-ID: <1347429481.19.0.886971277288.issue1260@bugs.pypy.org> Amaury Forgeot d Arc added the comment: Interesting corner case... PyPy behavior is: Traceback (most recent call last): File "app_main.py", line 51, in run_toplevel File "/tmp/t.py", line 10, in raise KeyboardInterrupt() File "/tmp/t.py", line 7, in __exit__ raise TypeError: raise: no active exception to re-raise CPython2.7 acts as expected, but note that python2.6 is similar to pypy here: Traceback (most recent call last): File "/tmp/t.py", line 10, in raise KeyboardInterrupt() File "/tmp/t.py", line 7, in __exit__ raise TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType And CPython3.2 (or 3.3) does not display the correct traceback: Traceback (most recent call last): File "/tmp/t.py", line 10, in raise KeyboardInterrupt() File "/tmp/t.py", line 10, in raise KeyboardInterrupt() KeyboardInterrupt ---------- nosy: +afa status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Sep 12 13:59:52 2012 From: tracker at bugs.pypy.org (Ariel Ben-Yehuda) Date: Wed, 12 Sep 2012 11:59:52 +0000 Subject: [pypy-issue] [issue1261] Implement PEP 3138 In-Reply-To: <1347451192.44.0.431539503569.issue1261@bugs.pypy.org> Message-ID: <1347451192.44.0.431539503569.issue1261@bugs.pypy.org> New submission from Ariel Ben-Yehuda : Also fixes a bug with surrogate handling ---------- files: pep3138-rc.patch messages: 4749 nosy: arielby, pypy-issue priority: feature status: unread title: Implement PEP 3138 ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Sep 12 14:01:22 2012 From: tracker at bugs.pypy.org (Ariel Ben-Yehuda) Date: Wed, 12 Sep 2012 12:01:22 +0000 Subject: [pypy-issue] [issue1262] Implement PEP 3138 In-Reply-To: <1347451282.6.0.989781872121.issue1262@bugs.pypy.org> Message-ID: <1347451282.6.0.989781872121.issue1262@bugs.pypy.org> New submission from Ariel Ben-Yehuda : Also fixes a bug with surrogate handling don't forget to regenerate the unicode tables after applying the patch ---------- files: pep3138-rc.patch messages: 4750 nosy: arielby, pypy-issue priority: feature status: unread title: Implement PEP 3138 ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Sep 12 14:24:35 2012 From: tracker at bugs.pypy.org (Ariel Ben-Yehuda) Date: Wed, 12 Sep 2012 12:24:35 +0000 Subject: [pypy-issue] [issue1262] Implement PEP 3138 In-Reply-To: <1347451282.6.0.989781872121.issue1262@bugs.pypy.org> Message-ID: <1347452675.96.0.875000594555.issue1262@bugs.pypy.org> Ariel Ben-Yehuda added the comment: new patch ---------- status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Sep 12 14:47:12 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Wed, 12 Sep 2012 12:47:12 +0000 Subject: [pypy-issue] [issue1261] Implement PEP 3138 In-Reply-To: <1347451192.44.0.431539503569.issue1261@bugs.pypy.org> Message-ID: <1347454032.88.0.191368533606.issue1261@bugs.pypy.org> Amaury Forgeot d Arc added the comment: Duplicate. see issue1262 instead. ---------- nosy: +afa status: unread -> invalid ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Sep 13 00:12:10 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Wed, 12 Sep 2012 22:12:10 +0000 Subject: [pypy-issue] [issue1260] sys.exc_info not being set before entering a context manager's __exit__ In-Reply-To: <1347406728.03.0.619393304673.issue1260@bugs.pypy.org> Message-ID: <1347487930.13.0.343991561335.issue1260@bugs.pypy.org> Amaury Forgeot d Arc added the comment: Fixed in 90debdd98abb. Thanks for the nice test case! ---------- status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Sep 13 19:52:23 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Thu, 13 Sep 2012 17:52:23 +0000 Subject: [pypy-issue] [issue1263] virtual-ize raw_mallocs in the JIT due to CFFI In-Reply-To: <1347558743.79.0.46208223373.issue1263@bugs.pypy.org> Message-ID: <1347558743.79.0.46208223373.issue1263@bugs.pypy.org> New submission from Armin Rigo : The JIT front-end (or maybe the optimizer) needs to optimize away the raw_mallocs left around by CFFI calls. ---------- messages: 4755 nosy: arigo, pypy-issue priority: performance bug status: unread title: virtual-ize raw_mallocs in the JIT due to CFFI ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Sep 13 19:53:22 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Thu, 13 Sep 2012 17:53:22 +0000 Subject: [pypy-issue] [issue1263] Port CFFI to Windows In-Reply-To: <1347558743.79.0.46208223373.issue1263@bugs.pypy.org> Message-ID: <1347558802.82.0.839150861735.issue1263@bugs.pypy.org> Armin Rigo added the comment: _cffi_backend needs to be ported to Windows ---------- priority: performance bug -> bug status: unread -> chatting title: virtual-ize raw_mallocs in the JIT due to CFFI -> Port CFFI to Windows ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 15 09:30:33 2012 From: tracker at bugs.pypy.org (bdk) Date: Sat, 15 Sep 2012 07:30:33 +0000 Subject: [pypy-issue] [issue1264] segmentation faults/fatal rpython errors with threading + import In-Reply-To: <1347694233.09.0.704847414829.issue1264@bugs.pypy.org> Message-ID: <1347694233.09.0.704847414829.issue1264@bugs.pypy.org> New submission from bdk : minimal test case attached, crashes on my system almost 100% repeatedly. get same failures replacing xattr with other .so modules. with linux64 nightly Python 2.7.3 (f07eec99afa5, Sep 13 2012, 04:52:35) ---------- messages: 4757 nosy: bdk, pypy-issue priority: bug status: unread title: segmentation faults/fatal rpython errors with threading + import ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 15 12:58:01 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Sat, 15 Sep 2012 10:58:01 +0000 Subject: [pypy-issue] [issue1264] segmentation faults/fatal rpython errors with threading + import In-Reply-To: <1347694233.09.0.704847414829.issue1264@bugs.pypy.org> Message-ID: <1347706681.43.0.757069584349.issue1264@bugs.pypy.org> Amaury Forgeot d Arc added the comment: I have an awful thought: is it possible that cpyext releases the GIL when it calls C functions? We should check make_generic_cpy_call() in module/cpyext/api.py. ---------- nosy: +afa status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 15 18:21:13 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sat, 15 Sep 2012 16:21:13 +0000 Subject: [pypy-issue] [issue1264] segmentation faults/fatal rpython errors with threading + import In-Reply-To: <1347694233.09.0.704847414829.issue1264@bugs.pypy.org> Message-ID: <1347726073.82.0.549148652707.issue1264@bugs.pypy.org> Armin Rigo added the comment: Found the bug together with Amaury. Will be fixed, but in the meantime, as a workaround, you can start your program with "import cpyext", anywhere before you create threads. ---------- nosy: +arigo ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 15 19:47:50 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Sat, 15 Sep 2012 17:47:50 +0000 Subject: [pypy-issue] [issue1264] segmentation faults/fatal rpython errors with threading + import In-Reply-To: <1347694233.09.0.704847414829.issue1264@bugs.pypy.org> Message-ID: <1347731270.29.0.142511804844.issue1264@bugs.pypy.org> Amaury Forgeot d Arc added the comment: Fixed with c23cd52909fb. Thanks for the report! ---------- status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 15 19:57:11 2012 From: tracker at bugs.pypy.org (bdk) Date: Sat, 15 Sep 2012 17:57:11 +0000 Subject: [pypy-issue] [issue1264] segmentation faults/fatal rpython errors with threading + import In-Reply-To: <1347694233.09.0.704847414829.issue1264@bugs.pypy.org> Message-ID: <1347731831.26.0.921588606278.issue1264@bugs.pypy.org> bdk added the comment: this workaround prevents the crash in this test case of import, but is not a general workaround for the bug -- if i run the second test case that calls a function in the extension module it still crashes 5-10% of the runs. does this fix work for the second test case as well? i'm running the second in a loop: for i in {1..100}; do pypy xxx.py; done ---------- status: resolved -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 15 21:16:27 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Sat, 15 Sep 2012 19:16:27 +0000 Subject: [pypy-issue] [issue1264] segmentation faults/fatal rpython errors with threading + import In-Reply-To: <1347694233.09.0.704847414829.issue1264@bugs.pypy.org> Message-ID: <1347736587.32.0.623451191992.issue1264@bugs.pypy.org> Amaury Forgeot d Arc added the comment: You also found a race condition in PyEval_SaveThread... Fixed in 9bf06ba21208. ---------- status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 18 00:58:38 2012 From: tracker at bugs.pypy.org (bdk) Date: Mon, 17 Sep 2012 22:58:38 +0000 Subject: [pypy-issue] [issue1265] crashes when testing rsocket.py under pypy In-Reply-To: <1347922718.7.0.490936971262.issue1265@bugs.pypy.org> Message-ID: <1347922718.7.0.490936971262.issue1265@bugs.pypy.org> New submission from bdk : ~/pypy$ ../pypy-c-jit-57366-073896dbe4e3-linux64/bin/pypy test_getaddrinfo.py *** glibc detected *** ../pypy-c-jit-57366-073896dbe4e3-linux64/bin/pypy: double free or corruption (out): 0x00007f06098a2780 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x7e626)[0x7f0607ba5626] /lib/x86_64-linux-gnu/libc.so.6(freeaddrinfo+0x20)[0x7f0607bf4b50] /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c)[0x7f0608769a14] /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x1e5)[0x7f0608769435] ../pypy-c-jit-57366-073896dbe4e3- linux64/bin/pypy(pypy_g_ccall_ffi_call__ffi_cifPtr_arrayPtr_arrayPtr_arr+0x6b) [0x20f10db] ---------- files: test_getaddrinfo.py messages: 4763 nosy: bdk, pypy-issue priority: bug status: unread title: crashes when testing rsocket.py under pypy ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 18 04:30:47 2012 From: tracker at bugs.pypy.org (bdk) Date: Tue, 18 Sep 2012 02:30:47 +0000 Subject: [pypy-issue] [issue1265] crashes when testing rsocket.py under pypy In-Reply-To: <1347922718.7.0.490936971262.issue1265@bugs.pypy.org> Message-ID: <1347935447.73.0.315517439089.issue1265@bugs.pypy.org> bdk added the comment: potential fix here https://bitbucket.org/pypy/pypy/pull-request/87/ but not familiar enough with pypy internals to know if it's 100% correct. hoping someone can review. ---------- status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 18 16:03:18 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Tue, 18 Sep 2012 14:03:18 +0000 Subject: [pypy-issue] [issue1265] crashes when testing rsocket.py under pypy In-Reply-To: <1347922718.7.0.490936971262.issue1265@bugs.pypy.org> Message-ID: <1347976998.11.0.0951090759011.issue1265@bugs.pypy.org> Armin Rigo added the comment: Located the problem as "p.contents" not having a "_b_base_" pointing back to "p". Fixed in d3f714e26354. ---------- nosy: +arigo status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Sep 18 17:29:36 2012 From: tracker at bugs.pypy.org (Ralf Schmitt) Date: Tue, 18 Sep 2012 15:29:36 +0000 Subject: [pypy-issue] [issue1248] please build with older GNU libc on Linux/amd64 In-Reply-To: <1346476259.72.0.54490436525.issue1248@bugs.pypy.org> Message-ID: <1347982176.93.0.314320451071.issue1248@bugs.pypy.org> Ralf Schmitt added the comment: I had great success with using a centos 5 machine as base and installing gentoo prefix on it: http://www.gentoo.org/proj/en/gentoo-alt/prefix/ I'm distributing my apps with every dynamic library besides what comes with glibc. I've also used http://nixos.org/patchelf.html in order to adapt the library search path. the instructions are only short if you download a ready made image. ---------- nosy: +schmir ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Sep 19 17:50:04 2012 From: tracker at bugs.pypy.org (Brian) Date: Wed, 19 Sep 2012 15:50:04 +0000 Subject: [pypy-issue] [issue1266] Popping and appending to range causes Fatal RPython error In-Reply-To: <1348069804.45.0.46260374891.issue1266@bugs.pypy.org> Message-ID: <1348069804.45.0.46260374891.issue1266@bugs.pypy.org> New submission from Brian : The following code causes Fatal RPython error: IndexError. d = range(1) d.pop() d.append(1) >From what I can tell the exception is always thrown if a range is popped until empty and then append is called with any argument. I have observed this behavior on both 1.8 and 1.9. No exception is thrown by cPython 2.7.3. Replacing the first line with "d = list(range(1))" does not prevent the exception, but "d = [x for x in range(1)]" does. Here is the raw output running the attached file (same as code above). RPython traceback: File "translator_goal_targetpypystandalone.c", line 2395, in entry_point File "interpreter_pyframe.c", line 984, in PyFrame_execute_frame File "jit_metainterp_warmspot.c", line 865, in ll_portal_runner__Unsigned_Bool_pypy_interpreter File "module_pypyjit_interp_jit.c", line 145, in portal_2 File "interpreter_pyopcode.c", line 2594, in handle_bytecode__AccessDirect_None File "interpreter_pyopcode.c", line 7365, in dispatch_bytecode__AccessDirect_None File "interpreter_pyopcode.c", line 14837, in call_function__AccessDirect_None File "interpreter_pyframe.c", line 984, in PyFrame_execute_frame File "jit_metainterp_warmspot.c", line 865, in ll_portal_runner__Unsigned_Bool_pypy_interpreter File "module_pypyjit_interp_jit.c", line 145, in portal_2 File "interpreter_pyopcode.c", line 2594, in handle_bytecode__AccessDirect_None File "interpreter_pyopcode.c", line 6978, in dispatch_bytecode__AccessDirect_None File "interpreter_pyopcode.c", line 14837, in call_function__AccessDirect_None File "interpreter_pyframe.c", line 984, in PyFrame_execute_frame File "jit_metainterp_warmspot.c", line 865, in ll_portal_runner__Unsigned_Bool_pypy_interpreter File "module_pypyjit_interp_jit.c", line 145, in portal_2 File "interpreter_pyopcode.c", line 2594, in handle_bytecode__AccessDirect_None File "interpreter_pyopcode.c", line 8125, in dispatch_bytecode__AccessDirect_None File "interpreter_pyopcode.c", line 14837, in call_function__AccessDirect_None File "interpreter_pyframe.c", line 984, in PyFrame_execute_frame File "jit_metainterp_warmspot.c", line 865, in ll_portal_runner__Unsigned_Bool_pypy_interpreter File "module_pypyjit_interp_jit.c", line 145, in portal_2 File "interpreter_pyopcode.c", line 2594, in handle_bytecode__AccessDirect_None File "interpreter_pyopcode.c", line 8018, in dispatch_bytecode__AccessDirect_None File "interpreter_pyopcode.c", line 20396, in EXEC_STMT__AccessDirect_None File "interpreter_pyframe.c", line 984, in PyFrame_execute_frame File "jit_metainterp_warmspot.c", line 865, in ll_portal_runner__Unsigned_Bool_pypy_interpreter File "module_pypyjit_interp_jit.c", line 145, in portal_2 File "interpreter_pyopcode.c", line 2594, in handle_bytecode__AccessDirect_None File "interpreter_pyopcode.c", line 9978, in dispatch_bytecode__AccessDirect_None File "objspace_std_callmethod.c", line 3506, in CALL_METHOD__AccessDirect_star_1 File "interpreter_gateway.c", line 1111, in BuiltinCode2_fastcall_2 File "interpreter_gateway.c", line 3166, in BuiltinCode_handle_exception Fatal RPython error: IndexError Abort ---------- files: broken.py messages: 4767 nosy: brianwgoldman, pypy-issue priority: bug release: 1.9 status: unread title: Popping and appending to range causes Fatal RPython error ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Sep 19 19:32:02 2012 From: tracker at bugs.pypy.org (Philip Jenvey) Date: Wed, 19 Sep 2012 17:32:02 +0000 Subject: [pypy-issue] [issue1266] Popping and appending to range causes Fatal RPython error In-Reply-To: <1348069804.45.0.46260374891.issue1266@bugs.pypy.org> Message-ID: <1348075922.68.0.465047798742.issue1266@bugs.pypy.org> Philip Jenvey added the comment: fixed in efca15c9d78e, thanks ---------- status: unread -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Sep 19 19:45:22 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Wed, 19 Sep 2012 17:45:22 +0000 Subject: [pypy-issue] [issue1266] Popping and appending to range causes Fatal RPython error In-Reply-To: <1348069804.45.0.46260374891.issue1266@bugs.pypy.org> Message-ID: <1348076722.34.0.81278235541.issue1266@bugs.pypy.org> Armin Rigo added the comment: http://bpaste.net/show/46442/ In other words I don't see the point of append(), which is prone to overflow bugs like this one. Killing it completely looks the safest option to me. ---------- nosy: +arigo status: resolved -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Sep 19 19:54:35 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Wed, 19 Sep 2012 17:54:35 +0000 Subject: [pypy-issue] [issue1266] Popping and appending to range causes Fatal RPython error In-Reply-To: <1348069804.45.0.46260374891.issue1266@bugs.pypy.org> Message-ID: <1348077275.69.0.946042308101.issue1266@bugs.pypy.org> Armin Rigo added the comment: More fun, overflowing the multiplication in getslice(): http://bpaste.net/show/46446/ ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Sep 20 01:56:59 2012 From: tracker at bugs.pypy.org (Philip Jenvey) Date: Wed, 19 Sep 2012 23:56:59 +0000 Subject: [pypy-issue] [issue1266] Popping and appending to range causes Fatal RPython error In-Reply-To: <1348069804.45.0.46260374891.issue1266@bugs.pypy.org> Message-ID: <1348099019.2.0.200210613534.issue1266@bugs.pypy.org> Philip Jenvey added the comment: The attached patch fixes Armin's bugs and a couple other corner cases in reversing operations. I pretty much just removed all of the affected optimizations altogether. getslice maybe seems a little more useful of an optimization than append/reverse/sort(True) are, but probably not that useful either. Armin, let me know if you'd prefer workarounds for any of these instead, otherwise I'll commit as is ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Sep 20 19:45:38 2012 From: tracker at bugs.pypy.org (Ariel Ben-Yehuda) Date: Thu, 20 Sep 2012 17:45:38 +0000 Subject: [pypy-issue] [issue1262] Implement PEP 3138 In-Reply-To: <1347451282.6.0.989781872121.issue1262@bugs.pypy.org> Message-ID: <1348163138.47.0.782255711694.issue1262@bugs.pypy.org> Ariel Ben-Yehuda added the comment: updated patch - is this legal RPython? ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Sep 20 19:49:44 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Thu, 20 Sep 2012 17:49:44 +0000 Subject: [pypy-issue] [issue1262] Implement PEP 3138 In-Reply-To: <1347451282.6.0.989781872121.issue1262@bugs.pypy.org> Message-ID: <1348163384.41.0.209926973041.issue1262@bugs.pypy.org> Armin Rigo added the comment: Just checking: it seems to me that PEP 3138 is about a change done *only* to Python 3, not back-ported to Python 2. Why are you patch not for the py3k branch of PyPy then? I may be wrong... ---------- nosy: +arigo ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Sep 20 19:58:53 2012 From: tracker at bugs.pypy.org (Ariel Ben-Yehuda) Date: Thu, 20 Sep 2012 17:58:53 +0000 Subject: [pypy-issue] [issue1262] Implement PEP 3138 In-Reply-To: <1347451282.6.0.989781872121.issue1262@bugs.pypy.org> Message-ID: <1348163933.39.0.496798062207.issue1262@bugs.pypy.org> Ariel Ben-Yehuda added the comment: The patch is for py3k ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Sep 20 20:00:41 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Thu, 20 Sep 2012 18:00:41 +0000 Subject: [pypy-issue] [issue1262] Implement PEP 3138 In-Reply-To: <1347451282.6.0.989781872121.issue1262@bugs.pypy.org> Message-ID: <1348164041.0.0.283791430877.issue1262@bugs.pypy.org> Armin Rigo added the comment: Indeed, sorry. I though "hg diff" would write the name of the branch somewhere in the patch, but it doesn't. Only the revision it's based on can indirectly point to the branch. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Sep 20 21:20:03 2012 From: tracker at bugs.pypy.org (Fijal) Date: Thu, 20 Sep 2012 19:20:03 +0000 Subject: [pypy-issue] [issue1199] psycopg2ct 2.4.4 segmentation fault on Ubuntu 12.04 64-bit In-Reply-To: <1341163597.62.0.605992819875.issue1199@bugs.pypy.org> Message-ID: <1348168803.32.0.420007734861.issue1199@bugs.pypy.org> Fijal added the comment: Closing if fixed. PLease reopen if it still appears. ---------- nosy: +fijal status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Sep 21 10:05:41 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Fri, 21 Sep 2012 08:05:41 +0000 Subject: [pypy-issue] [issue1266] Popping and appending to range causes Fatal RPython error In-Reply-To: <1348069804.45.0.46260374891.issue1266@bugs.pypy.org> Message-ID: <1348214741.47.0.747735469506.issue1266@bugs.pypy.org> Armin Rigo added the comment: It's fine to kill. After all, for comparison, xrange() objects support very little of the list interface; I would say that there is no point in doing optimizations with our range() objects that go beyond what xrange() supports. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Sep 21 19:51:04 2012 From: tracker at bugs.pypy.org (Philip Jenvey) Date: Fri, 21 Sep 2012 17:51:04 +0000 Subject: [pypy-issue] [issue1266] Popping and appending to range causes Fatal RPython error In-Reply-To: <1348069804.45.0.46260374891.issue1266@bugs.pypy.org> Message-ID: <1348249864.8.0.867486205726.issue1266@bugs.pypy.org> Philip Jenvey added the comment: committed the further related fixes in ad495c36a765 ---------- status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 22 22:15:16 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sat, 22 Sep 2012 20:15:16 +0000 Subject: [pypy-issue] [issue1067] Performance on Stack-Based VM machine In-Reply-To: <1329857569.22.0.328879135116.issue1067@bugs.pypy.org> Message-ID: <1348344915.94.0.128635205199.issue1067@bugs.pypy.org> Armin Rigo added the comment: Finally found a simple idea (c7c74257157c): when we hit the limit 'max_unroll_loops', then instead of aborting, retry to compile by disabling the 'unroll' optimization. This alone fixes go2.py, which runs 235 times faster now than before, and 8.7 times faster than CPython. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Sep 23 00:20:49 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sat, 22 Sep 2012 22:20:49 +0000 Subject: [pypy-issue] [issue1253] compile => RuntimeError: maximum recursion depth exceeded In-Reply-To: <1347011043.22.0.852237039186.issue1253@bugs.pypy.org> Message-ID: <1348352449.51.0.461771779631.issue1253@bugs.pypy.org> Armin Rigo added the comment: Testing, close if it works (417403f0dc1a) ---------- nosy: +arigo status: unread -> testing ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Sep 24 12:52:09 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Mon, 24 Sep 2012 10:52:09 +0000 Subject: [pypy-issue] [issue1267] RPython MemoryError in the GC In-Reply-To: <1348483929.66.0.926922716548.issue1267@bugs.pypy.org> Message-ID: <1348483929.66.0.926922716548.issue1267@bugs.pypy.org> New submission from Armin Rigo : I think we don't have this as a bug report, so here it is: We need to look at when the GC can raise an RPython-level MemoryError and fix what occurs then. We'd also need to do something about the situation of getting out of memory, which right now means unrecoverable death. http://mail.python.org/pipermail/pypy-dev/2012-August/010394.html ---------- messages: 4781 nosy: arigo, pypy-issue priority: bug status: unread title: RPython MemoryError in the GC ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Sep 26 14:55:04 2012 From: tracker at bugs.pypy.org (Simon Lundberg) Date: Wed, 26 Sep 2012 12:55:04 +0000 Subject: [pypy-issue] [issue1268] file.writelines() very slow on Windows In-Reply-To: <1348664104.59.0.290334033173.issue1268@bugs.pypy.org> Message-ID: <1348664104.59.0.290334033173.issue1268@bugs.pypy.org> New submission from Simon Lundberg : Using file.writelines() in 32-bit PyPy on Windows seems very slow (40x-60x slower than in CPython). Using file.write() with large chunks of data is much faster (though still not as fast as in CPython). Attached is a small function that takes a file path and number of lines in the file as arguments. It creates a set of dummy data, and writes it out using file.write() and file.writelines(), and prints out the timings. I'm getting the following results: CPython 64-bit: f.write(): 0.098 f.writelines(): 0.161 CPython 32-bit: f.write(): 0.127 f.writelines(): 0.205 PyPy 32-bit: f.write(): 0.297 f.writelines(): 9.47 ---------- files: writeTest.py messages: 4782 nosy: SimonLundberg, pypy-issue priority: performance bug status: unread title: file.writelines() very slow on Windows ________________________________________ PyPy bug tracker ________________________________________ -------------- next part -------------- import time def writeTest(path, numLines=1000000): t = [time.time()] data = '\n'.join(['this is a line of data' for i in range(numLines)]) t.append(time.time()) print 'Creating data: ', t[-1] - t[-2] with file(path, 'w') as f: f.write(data) t.append(time.time()) print 'f.write(): ', t[-1] - t[-2] data = ['this is a line of data\n' for i in range(numLines)] t.append(time.time()) print 'Creating data: ', t[-1] - t[-2] with file(path, 'w') as f: f.writelines(data) t.append(time.time()) print 'f.writelines(): ', t[-1] - t[-2] From tracker at bugs.pypy.org Thu Sep 27 08:55:57 2012 From: tracker at bugs.pypy.org (Alexey Poryadin) Date: Thu, 27 Sep 2012 06:55:57 +0000 Subject: [pypy-issue] [issue1269] weakref.WeakSet does not work correctly In-Reply-To: <1348728957.11.0.250940191016.issue1269@bugs.pypy.org> Message-ID: <1348728957.11.0.250940191016.issue1269@bugs.pypy.org> New submission from Alexey Poryadin : WeakSet works incorrectly, try sample below: from weakref import WeakSet class Obj(object): pass o1 = Obj() o2 = Obj() ws = WeakSet([o1, o2]) del o2 assert len(tuple(ws))==1 ---------- messages: 4783 nosy: alesh, pypy-issue priority: bug status: unread title: weakref.WeakSet does not work correctly ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Sep 27 09:41:51 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Thu, 27 Sep 2012 07:41:51 +0000 Subject: [pypy-issue] [issue1269] weakref.WeakSet does not work correctly In-Reply-To: <1348728957.11.0.250940191016.issue1269@bugs.pypy.org> Message-ID: <1348731711.59.0.604899306422.issue1269@bugs.pypy.org> Amaury Forgeot d Arc added the comment: This is an assumed difference with CPython; PyPy does not use reference counting to manage memory. See this paragraph about PyPy's garbage collector: http://doc.pypy.org/en/latest/cpython_differences.html#differences-related-to-garbage- collection-strategies """... It also means that weak references may stay alive for a bit longer than expected.""" You could add a call to gc.collect() to clear weak references, but of course this has a large performance impact. ---------- nosy: +afa status: unread -> wontfix ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Sep 27 14:19:25 2012 From: tracker at bugs.pypy.org (Alexey Poryadin) Date: Thu, 27 Sep 2012 12:19:25 +0000 Subject: [pypy-issue] [issue1269] weakref.WeakSet does not work correctly In-Reply-To: <1348728957.11.0.250940191016.issue1269@bugs.pypy.org> Message-ID: <1348748365.28.0.857349503561.issue1269@bugs.pypy.org> Alexey Poryadin added the comment: I understand, but saddened :) This difference would not allow to port of certain programs from CPython. Programs that used weakref usually expects what weak references becoming dead immediately. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Sep 28 01:58:23 2012 From: tracker at bugs.pypy.org (Antony Lee) Date: Thu, 27 Sep 2012 23:58:23 +0000 Subject: [pypy-issue] [issue1270] ctypes structure should allow unicode field names In-Reply-To: <1348790303.3.0.849012689351.issue1270@bugs.pypy.org> Message-ID: <1348790303.3.0.849012689351.issue1270@bugs.pypy.org> New submission from Antony Lee : from ctypes import * class C(Structure): _fields_ = [(u"field", c_int)] fails with pypy (TypeError: cannot add non-string keys to dict of a type), but works with cpython2. The bug is in structure.py, line 71: self.__dict__.update(fields) which should be replaced by for k, v in fields: setattr(self, k, v) because setattr does (I think?) an implicit unicode->bytes conversion. ---------- messages: 4786 nosy: antony, pypy-issue priority: bug status: unread title: ctypes structure should allow unicode field names ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Sep 28 20:46:32 2012 From: tracker at bugs.pypy.org (Ronny Pfannschmidt) Date: Fri, 28 Sep 2012 18:46:32 +0000 Subject: [pypy-issue] [issue1271] nightly requires a libffi shared lib thats newer than what debian has In-Reply-To: <1348857992.41.0.377657301298.issue1271@bugs.pypy.org> Message-ID: <1348857992.41.0.377657301298.issue1271@bugs.pypy.org> New submission from Ronny Pfannschmidt : $ pypy-bin /home/ronny/Projects/pypy/pypy-bin/bin/pypy: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory debian only has libffi5 ---------- messages: 4787 nosy: pypy-issue, ronny priority: bug status: unread title: nightly requires a libffi shared lib thats newer than what debian has ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Sep 28 20:49:34 2012 From: tracker at bugs.pypy.org (Ronny Pfannschmidt) Date: Fri, 28 Sep 2012 18:49:34 +0000 Subject: [pypy-issue] [issue1271] nightly requires a libffi shared lib thats newer than what debian has In-Reply-To: <1348857992.41.0.377657301298.issue1271@bugs.pypy.org> Message-ID: <1348858174.4.0.696849110208.issue1271@bugs.pypy.org> Ronny Pfannschmidt added the comment: extra note, even when being evil and copying libffi.so.5 in that place it fails wrt glibc version LD_LIBRARY_PATH=lib pypy-bin /home/ronny/Projects/pypy/pypy-bin/bin/pypy: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by /home/ronny/Projects/pypy/pypy-bin/bin/pypy) /home/ronny/Projects/pypy/pypy-bin/bin/pypy: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.15' not found (required by /home/ronny/Projects/pypy/pypy-bin/bin/pypy) ---------- status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 29 11:22:42 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sat, 29 Sep 2012 09:22:42 +0000 Subject: [pypy-issue] [issue1271] nightly requires a libffi shared lib thats newer than what debian has In-Reply-To: <1348857992.41.0.377657301298.issue1271@bugs.pypy.org> Message-ID: <1348910562.12.0.808834968036.issue1271@bugs.pypy.org> Armin Rigo added the comment: Looks like a duplicate of Issue1248. ---------- nosy: +arigo ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 29 12:00:04 2012 From: tracker at bugs.pypy.org (Fijal) Date: Sat, 29 Sep 2012 10:00:04 +0000 Subject: [pypy-issue] [issue1248] please build with older GNU libc on Linux/amd64 In-Reply-To: <1346476259.72.0.54490436525.issue1248@bugs.pypy.org> Message-ID: <1348912804.0.0.792513665009.issue1248@bugs.pypy.org> Fijal added the comment: Just for some information The Ubuntu we use has a standard libc (whatever comes with ubuntu) and a new gcc (4.7). Everything else is completely standard ---------- nosy: +fijal ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Sep 29 22:14:59 2012 From: tracker at bugs.pypy.org (Marcus Smith) Date: Sat, 29 Sep 2012 20:14:59 +0000 Subject: [pypy-issue] [issue1272] user and home install schemes broke in pypy In-Reply-To: <1348949699.1.0.101888055363.issue1272@bugs.pypy.org> Message-ID: <1348949699.1.0.101888055363.issue1272@bugs.pypy.org> New submission from Marcus Smith : the user and home installation schemes are broke in pypy 1.9 due it's custom "pypy" installation scheme. user scheme: http://docs.python.org/dev/distutils/install.html#alternate- installation-the-user-scheme home scheme: http://docs.python.org/dev/distutils/install.html#alternate- installation-the-home-scheme there's a wake of issues/workarounds in pip and virtualenv related to the "pypy" scheme: -https://github.com/pypa/pip/issues/629 -https://github.com/pypa/pip/issues/624 -https://github.com/pypa/pip/issues/625 -https://github.com/pypa/virtualenv/issues/306 -https://github.com/pypa/virtualenv/issues/302 I created a diff that shows the difference for distutils.command.install between py2.7 and pypy1.9, and discuss options. https://github.com/qwcode/pypy_scheme/commit/b7856156f302c192698cd311df814dfd3bf 7a8a0 ---------- messages: 4791 nosy: pypy-issue, qwcode priority: bug release: 1.9 status: unread title: user and home install schemes broke in pypy ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Sep 30 15:59:09 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sun, 30 Sep 2012 13:59:09 +0000 Subject: [pypy-issue] [issue1273] test_multiprocessing is skipped In-Reply-To: <1349013548.68.0.193914332397.issue1273@bugs.pypy.org> Message-ID: <1349013548.68.0.193914332397.issue1273@bugs.pypy.org> New submission from Armin Rigo : test_multiprocessing.py is skipped, and if we enable it it hangs forever on Linux. Investigate. ---------- messages: 4792 nosy: arigo, pypy-issue priority: bug status: unread title: test_multiprocessing is skipped ________________________________________ PyPy bug tracker ________________________________________