[issue46657] Add mimalloc memory allocator

2022-02-06 Thread Neil Schemenauer
Neil Schemenauer added the comment: Thanks, I'm indeed interested. Most credit goes to Christian for advancing this. For the missing stdatomic.h, would it be appropriate to have an autoconfig check for it? Can just disable mimalloc if it doesn&#x

[issue46657] Add mimalloc memory allocator

2022-02-07 Thread Neil Schemenauer
Neil Schemenauer added the comment: My preference would be for --with-mimalloc=yes in an upcoming release. For platforms without the required stdatomic.h stuff, they can manually specify --with-mimalloc=no. That will make them aware that a future release of Python might no longer build (if

[issue1185] py3k: Completely remove nb_coerce slot

2007-09-21 Thread Neil Schemenauer
Neil Schemenauer added the comment: I made the changes as suggest by Guido. Commited as SVN rev 58226. Thanks for the patch. -- nosy: +nas __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1134] Parsing a simple script eats all of your memory

2007-09-21 Thread Neil Schemenauer
Neil Schemenauer added the comment: It looks to me like fp_readl is no longer working as designed and the patch is not really the right fix. The use of "decoding_buffer" is tricky and I think the conversion to bytes screwed it up. It might be clearer to have a separate "de

[issue9011] ast_for_factor unary minus optimization changes AST

2010-10-18 Thread Neil Schemenauer
Neil Schemenauer added the comment: I'm late to the party but looks like Mark has a good handle on the issues. I would recommend not changing behavior in a bugfix release. I'm pretty sure code "in the wild" would be broken. -- __

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-10-18 Thread Neil Schemenauer
Neil Schemenauer added the comment: Closing this bug. I don't think it makes sense to change the mhlib module in bugfix release. My patch is fairly simple but not simple enough to make me feel comfortable. -- resolution: -> wont fix status: open -

[issue10241] gc fixes for module m_copy attribute

2010-10-29 Thread Neil Schemenauer
New submission from Neil Schemenauer : I'm trying implement some saner module shutdown procedure (similar to issue 812369). One of the many problems I've run into is that the GC doesn't know about the m_copy attribute of modules. I think the attached patch is correct. tp_tr

[issue10255] refleak in initstdio

2010-10-30 Thread Neil Schemenauer
New submission from Neil Schemenauer : It looks to me like initstdio leaks a reference to "open". AFAIK, PyObject_SetAttrString() does not steal a reference. -- assignee: pitrou components: Interpreter Core files: initstdio_refleak.txt messages: 120008 nosy: nascheme, pitro

[issue10241] gc fixes for module m_copy attribute

2010-10-31 Thread Neil Schemenauer
Neil Schemenauer added the comment: Oops, my patch doesn't work since m_base can be shared by more than one module instance. I guess a different solution would be to cleanup the m_copy references on interpreter shutdown. Somehow they would have to be found t

[issue10241] gc fixes for module m_copy attribute

2010-11-05 Thread Neil Schemenauer
Neil Schemenauer added the comment: The attached patch seems better. The copies of module dicts stored in the interpreter state are dereferenced when the interpreter shuts down. -- Added file: http://bugs.python.org/file19509/module_m_copy2.txt

[issue10333] Remove ancient backwards compatibility GC API

2010-11-05 Thread Neil Schemenauer
New submission from Neil Schemenauer : I think it should be safe to remove some backwards compatibility cruft. This was introduced during the 2.3 development cycle. -- files: gc_cruft.txt messages: 120554 nosy: nascheme priority: low severity: normal status: open title: Remove ancient

[issue3054] test_disutils fails

2008-06-19 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: Looks like this has exposed some ugly code. From setup.py: # Figure out the location of the source code for extension modules # (This logic is copied in distutils.test.test_sysconfig, # so building in a separate directory do

[issue3054] test_disutils fails

2008-06-19 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: I think my previous patch combined with sysconfig_builddir.patch fixes this issue. Someone will need to test on other platforms. Note that the messy code in setup.py and in the tests should still be cleaned up. BTW, distutils is a

[issue3054] test_disutils fails

2008-06-19 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: One final patch for today (get_python_inc.patch). The patch combines my previous two patches and also cleans up some ugly code in setup.py and test_sysconfig.py. The source of the ugliness was that get_python_inc() did not wor

[issue3054] test_disutils fails

2008-06-19 Thread Neil Schemenauer
Changes by Neil Schemenauer <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10659/test_ext_src.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3054] test_disutils fails

2008-06-19 Thread Neil Schemenauer
Changes by Neil Schemenauer <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10660/sysconfig_builddir.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue7753] newgil backport

2010-01-21 Thread Neil Schemenauer
Neil Schemenauer added the comment: Looks like the 2.7 patch has a spurious change to /Lib/unittest/runner.py. -- nosy: +nascheme ___ Python tracker <http://bugs.python.org/issue7

[issue7753] newgil backport

2010-01-22 Thread Neil Schemenauer
Neil Schemenauer added the comment: Here is an updated set of patches that includes the ceval_gil.h file as well as the documentation changes. -- Added file: http://bugs.python.org/file15974/gil-2.7.txt ___ Python tracker <http://bugs.python.

[issue4698] Solaris buildbot failure on trunk in test_hostshot

2010-01-22 Thread Neil Schemenauer
Changes by Neil Schemenauer : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue4698> ___ ___ Python-bugs-list

[issue1220756] Re-importing embedded thread dumps core

2010-01-22 Thread Neil Schemenauer
Changes by Neil Schemenauer : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue1220756> ___ ___ Python-bugs-

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-22 Thread Neil Schemenauer
New submission from Neil Schemenauer : Btrfs does not maintain a link count for directories (MacOS does the same I think). That confuses mhlib.py because it uses os.stat().st_nlinks as an optimization. The attached patch removes the optimization and make test_mhlib pass on Btrfs (and

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Neil Schemenauer
Neil Schemenauer added the comment: On Sat, Jan 23, 2010 at 06:09:33PM +, Antoine Pitrou wrote: > The documentation mentions that mhlib is deprecated and mailbox > should be used instead. Is there any point in trying to fix it? It looks like Btrfs will eventually conform to tradi

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-24 Thread Neil Schemenauer
Neil Schemenauer added the comment: On Sun, Jan 24, 2010 at 01:25:18AM +, Antoine Pitrou wrote: > That wasn't really my question. What I ask is: since mhlib is > deprecated, why do we need to fix it while people are encouraged to use > mailbox instead? Sorry, I don't

[issue7881] Hardcoded path, unsafe tempfile in test_logging

2010-02-07 Thread Neil Schemenauer
New submission from Neil Schemenauer : The commit for issue #7868 added the following line to test_logging: print >> open('/tmp/tmp.txt', 'w'), type(logger) I'm not sure if that was intentional but it should be fixed. For one, that path does not necessarily e

[issue7885] test_distutils fails if Python built in separate directory

2010-02-08 Thread Neil Schemenauer
New submission from Neil Schemenauer : Lib/test/test_distutils.py crashes if Python was built in a directory other than the source directory. Using a separate build directory is handy if you are building Python with different sets of configure options since you only need one copy of the

[issue1266570] PEP 349: allow str() to return unicode

2007-12-08 Thread Neil Schemenauer
Neil Schemenauer added the comment: On Sat, Dec 08, 2007 at 05:14:45AM -, Alexandre Vassalotti wrote: > The PEP has been deferred and the patch is out of date. So, is this > change still wanted? I still think it would make things easier for people using Unicode with Python 2.x. H

[issue628842] Deprecate PyNumber_Check

2008-03-20 Thread Neil Schemenauer
Changes by Neil Schemenauer <[EMAIL PROTECTED]>: -- status: open -> closed Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue628842> ___ Pyt

[issue1251748] compiler package: "global a; a=5"

2008-03-24 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: On Sun, Mar 23, 2008 at 04:17:12PM +, Antoine Pitrou wrote: > Armin, if you still care about the compiler package, could you (or some > other pypy coder) take a look at #2459? As part of the patch, it > rewrites the f

[issue2250] rlcompleter raises Exception on bad input

2008-03-24 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: On Thu, Mar 20, 2008 at 08:49:32PM +, Sean Reifschneider wrote: > Is a straightforward patch, but I'd like NAS to comment on the change in > behavior. Probably would also need a documentation change, are you up > f

[issue2467] gc.DEBUG_STATS reports invalid "elapsed" times

2008-03-24 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: The original code is pretty icky. I'm attaching a patch that improves it, IMO. Before the elapsed time was only shown if garbage was found. I think it should always be shown if DEBUG_STATS is set. -- nosy: +nas Added

[issue1251748] compiler package: "global a; a=5"

2008-03-25 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: On Tue, Mar 25, 2008 at 09:18:38AM +, Armin Rigo wrote: > The situation is that by now PyPy has found many many more bugs in > trying to use the compiler package to run the whole stdlib and > real-world applications. Wha

[issue4151] Separate build dir broken

2008-10-20 Thread Neil Schemenauer
New submission from Neil Schemenauer <[EMAIL PROTECTED]>: Building in a separate directory got broken at some point. The code is hairy but it looks like the source of the problem was a lame sysconfig.get_python_inc() function. The attached patches fix things and hopefully do not introdu

[issue4151] Separate build dir broken

2008-10-20 Thread Neil Schemenauer
Changes by Neil Schemenauer <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11838/get_python_inc2.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4151] Separate build dir broken

2008-10-20 Thread Neil Schemenauer
Changes by Neil Schemenauer <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11837/get_python_inc.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4151] Separate build dir broken

2008-10-20 Thread Neil Schemenauer
Changes by Neil Schemenauer <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11839/get_python_inc2.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4152] ihooks module cannot handle absolute imports

2008-10-20 Thread Neil Schemenauer
New submission from Neil Schemenauer <[EMAIL PROTECTED]>: The ihooks module was updated when the absolute imports feature was implemented. At a minimum, I guess the import_module() methods in that module would need to have "level=-1" keyword arguments added. The only library

[issue4070] python tests failure if builddir <> sourcedir

2008-10-20 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: Issue 4151 contains a similar patch but it cleans up more code, IMHO. -- nosy: +nas ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4151] Separate build dir broken

2008-10-22 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: [Roumen Petrov] > Modification for test_build_ext.py from above mentioned issue break > non-posix builds. Without that change the test fails on Unix platforms when the build is not done inside the source directory. I guess

[issue4151] Separate build dir broken

2009-02-05 Thread Neil Schemenauer
Neil Schemenauer added the comment: I committed my proposed changes in several chunks, ending with r69305. I think building in a separate directory again works and that non-POSIX platforms are not adversely affected by this change. ___ Python tracker <h

[issue4151] Separate build dir broken

2009-02-05 Thread Neil Schemenauer
Neil Schemenauer added the comment: I committed my proposed changes in several chunks, ending with r69305. I think building in a separate directory again works and that non-POSIX platforms are not adversely affected by this change. -- nosy: +nascheme resolution: -> fixed status: o

[issue4151] Separate build dir broken

2009-02-05 Thread Neil Schemenauer
Changes by Neil Schemenauer : ___ Python tracker <http://bugs.python.org/issue4151> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/o

[issue4070] python tests failure if builddir <> sourcedir

2009-02-05 Thread Neil Schemenauer
Changes by Neil Schemenauer : -- assignee: -> nascheme nosy: +nascheme resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.o

[issue4151] Separate build dir broken

2009-02-05 Thread Neil Schemenauer
Neil Schemenauer added the comment: Roumen, thanks for reporting the bug. It seems that distutils requires an absolute path (although I didn't waste time digging too deep into the issue). ___ Python tracker <http://bugs.python.org/i

[issue5161] wrong paths for ctypes cleanup

2009-02-05 Thread Neil Schemenauer
New submission from Neil Schemenauer : The following code was added to Makefile.pre.in when ctypes was merged: find $(srcdir)/build -name 'fficonfig.h' -exec rm -f {} ';' || true find $(srcdir)/build -name 'fficonfig.py' -exec rm -f {} ';' || tr

[issue2472] Fixed block ordering code in compiler.pyassem

2009-02-06 Thread Neil Schemenauer
Neil Schemenauer added the comment: Thanks Antoine. For some reason I don't think I ever got an email about this issue. I did some further cleanups and optimizations. Committed as SVN rev 69373. Lib/compiler is still in need of some fixing since it doesn't handle decorators and

[issue1544277] python compiler support for with stmt

2009-02-06 Thread Neil Schemenauer
Neil Schemenauer added the comment: Looks like this has already been fixed in SVN rev 53575. -- resolution: -> out of date stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue1754094] Tighter co_stacksize computation in stackdepth_walk

2009-02-06 Thread Neil Schemenauer
Changes by Neil Schemenauer : -- assignee: -> nascheme nosy: +nascheme ___ Python tracker <http://bugs.python.org/issue1754094> ___ ___ Python-bugs-list mai

[issue999042] Compiler module doesn't handle global statement correctly

2009-02-06 Thread Neil Schemenauer
Neil Schemenauer added the comment: Fixed in SVN rev 69394 (finally). This was done by having the symbol table differentiate between explicit and implicit globals. -- assignee: jhylton -> nascheme nosy: +nascheme resolution: -> fixed status: open -&g

[issue999444] compiler module doesn't support unicode characters in laiter

2009-02-06 Thread Neil Schemenauer
Changes by Neil Schemenauer : -- assignee: jhylton -> nascheme nosy: +nascheme ___ Python tracker <http://bugs.python.org/issue999444> ___ ___ Python-bugs-lis

[issue5064] compiler.parse raises SyntaxErrors without line number information

2009-02-06 Thread Neil Schemenauer
Changes by Neil Schemenauer : -- assignee: -> nascheme nosy: +nascheme ___ Python tracker <http://bugs.python.org/issue5064> ___ ___ Python-bugs-list mai

[issue5178] Add content manager for temporary directory

2009-02-07 Thread Neil Schemenauer
New submission from Neil Schemenauer : I noticed that it would be nice to have a temporary directory context manager while trying to fix a broken unittest. The attached patch provides a pretty minimal implementation. There appears to be lots of unit tests that could use such a thing (just

[issue4151] Separate build dir broken

2009-02-12 Thread Neil Schemenauer
Neil Schemenauer added the comment: On Thu, Feb 12, 2009 at 01:32:37PM +, Matthias Klose wrote: > still seen on the 2.6 branch. applying r69374 on the branch doesn't fix > it there. The fix is spread over a number of commits: r69374, r69322, r69315, r69305, r69304, r69303,

[issue5178] Add context manager for temporary directory

2009-02-13 Thread Neil Schemenauer
Neil Schemenauer added the comment: New version of the patch. Added a __del__ method that hopefully works reliably. Added NEWS and an example of TemporaryFile as a context manager. I did not change more tests to use TemporaryDirectory since I understand hit-and-run modernization of code is

[issue5178] Add context manager for temporary directory

2009-02-14 Thread Neil Schemenauer
Neil Schemenauer added the comment: Argh, it's like pulling a sweater thread. The stat.S_ISDIR function uses the S_IFDIR global so I would have write my own. This does not look like good maintainable code, IMO. Maybe there should be a special flag modules can set to make them get cl

[issue812369] module shutdown procedure based on GC

2009-02-14 Thread Neil Schemenauer
Neil Schemenauer added the comment: This sounds like a nice idea. The current cleanup procedure in pythonrun.c is pretty lame since it can play havoc with __del__ methods (e.g. if they run after globals have been cleared). I've updated the patch to work with the current SVN head. Pro

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-27 Thread Neil Schemenauer
Neil Schemenauer added the comment: A few comments from the "peanut gallery". Thanks to Victor and Pablo for doing the hard work of investigating this bug. First, it has been a long time since Tim and I first developed gcmodule.c. So, some of my understanding may be inaccurate d

[issue38009] Handle weakreference callbacks invoked indirectly in the middle of a gc collection

2019-09-27 Thread Neil Schemenauer
Neil Schemenauer added the comment: I think the problem with your logic is that the weakref to F is part of the garbage set. So, handle_finalizers() should detect that and clear the finalizer rather than call it. Once we get to delete_garbage() and start calling tp_clear(), we can'

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-29 Thread Neil Schemenauer
Neil Schemenauer added the comment: Victor: > I'm surprised that the function would be seen as "unreachable" if > it's reference counter was equal to 135: If all those references are contained within that garbage set, it is possible. Pablo: > For the weakre

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-29 Thread Neil Schemenauer
Neil Schemenauer added the comment: I hacked up my copy of CPython to add flags to PyObject to see the GC state of objects. That makes it easier to know if an object is in the 'unreachable' list or not. > We must know that F is trash, else we never would have called tp_clear(

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-29 Thread Neil Schemenauer
Neil Schemenauer added the comment: Since W is in the unreachable set, we should not be executing its callback. Would the attached rough patch (gc_disable_wr_callback.txt) be a possible fix? When we find W inside handle_weakrefs(), we mark it as trash and will not execute the callback

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-29 Thread Neil Schemenauer
Neil Schemenauer added the comment: > Fleshing out something I left implicit: if there's a trash object T > with a finalizer but we don't KNOW it's trash, we won't force-run its > finalizer before delete_garbage starts either. Then, really the same > thing: we

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-29 Thread Neil Schemenauer
Neil Schemenauer added the comment: > We can have finalizer code running during delete_garbage(). That > code should not have access to non-valid objects. Weakrefs seem be > a way to violate that. handle_weakrefs() take care of some of them > but it seems there are other issues.

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Change by Neil Schemenauer : -- pull_requests: +16083 pull_request: https://github.com/python/cpython/pull/16495 ___ Python tracker <https://bugs.python.org/issue38

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Neil Schemenauer added the comment: > Why setting it back to release blocker? As far as I recall, this issue is not > a Python 3.8 regression. The regression which triggered this old and existing > bug has been fixed, see previous comments. I leave it up to our glorious release m

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Neil Schemenauer added the comment: Oops, I linked to wrong PR, my proposed fix is GH-16495. It is the same as what Tim suggests in his last comment. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Neil Schemenauer added the comment: > Would [func tp_clear] help with memory usage in functions or was BPO-33418 > addressed in another way since? Having a tp_clear for all container objects that can be involved in reference cycles will help the GC free memory. BPO-33418 may be con

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Neil Schemenauer added the comment: > Is introducing tp_clear on functions a thing that has ABI consequences? In > other words, if we take our time on this, would it land in 3.8.1 or 3.9.0? I think it should not have ABI consequences. However, I see the addition of tp_clear as

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Change by Neil Schemenauer : -- pull_requests: +16092 pull_request: https://github.com/python/cpython/pull/16502 ___ Python tracker <https://bugs.python.org/issue38

[issue37725] "make clean" should remove PGO task data

2019-09-30 Thread Neil Schemenauer
Change by Neil Schemenauer : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Neil Schemenauer added the comment: I created GH-16502. I'm not exactly sure of the process of making a revert on a branch like '3.8' so hopefully it is correct. The code change is exactly what has been reverted in 3.8. The net effect will be as if the revert

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Change by Neil Schemenauer : -- nosy: +benjamin.peterson, larry, ned.deily versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue38

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Neil Schemenauer added the comment: I worked some on trying to create a unit test this evening. Attached is my best result so far (gc_weakref_bug_demo.py). It requires that you enable the 'xx' module so we have a container object without tp_traverse. We should probably

[issue33418] Memory leaks in functions

2019-10-01 Thread Neil Schemenauer
Change by Neil Schemenauer : -- pull_requests: +16095 pull_request: https://github.com/python/cpython/pull/16502 ___ Python tracker <https://bugs.python.org/issue33

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-10-01 Thread Neil Schemenauer
Neil Schemenauer added the comment: Ɓukasz, is there some reason you removed old versions (2.7, 3.6, etc)? The bug is present on those versions of Python and it should be trivial to backport the fix. If those branches are maintained, I think we should fix it. Attached is a small test

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-10-14 Thread Neil Schemenauer
Change by Neil Schemenauer : -- pull_requests: +16348 pull_request: https://github.com/python/cpython/pull/16788 ___ Python tracker <https://bugs.python.org/issue38

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-10-14 Thread Neil Schemenauer
Neil Schemenauer added the comment: > It's fundamentally insane to expect any gc to work perfectly when it may be > blind to what the object graph _is_. I'm often amazed it works at all, let alone perfectly. ;-P This did trigger me to think of another possible problem. I se

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-10-15 Thread Neil Schemenauer
Neil Schemenauer added the comment: New changeset 392a13bb9346331b087bcd8bb1b37072c126abee by Neil Schemenauer in branch 'master': bpo-38006: Add unit test for weakref clear bug (GH-16788) https://github.com/python/cpython/commit/392a13bb9346331b087bcd8bb1b370

[issue37448] obmalloc: radix tree for tracking arena address ranges

2021-03-29 Thread Neil Schemenauer
Neil Schemenauer added the comment: New changeset 85b6b70589c187639aeebc560d67e9cc04abb4d8 by Neil Schemenauer in branch 'master': bpo-37448: Use radix tree for pymalloc address_in_range(). (GH-14474) https://github.com/python/cpython/commit/85b6b70589c187639aeebc560d67e9

[issue37448] obmalloc: radix tree for tracking arena address ranges

2021-03-29 Thread Neil Schemenauer
Change by Neil Schemenauer : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43593] pymalloc is not aware of Memory Tagging Extension (MTE) and crashes

2021-03-29 Thread Neil Schemenauer
Neil Schemenauer added the comment: I've merged PR 14474 so you can just test with an up-to-date "main" branch and see if that fixes the problem. I would expect it should fix the problem since with the radix tree arena tracking, no memory unsanitary behaviour remains.

[issue37368] test_asyncio: test_create_server_ssl_match_failed() failed on s390x SLES 3.x and logged an unraisable exception

2021-03-29 Thread Neil Schemenauer
Neil Schemenauer added the comment: Seems this failure might be back. At least, the traceback looks quite similar to me. The buildbot failed with this: heads/master:85b6b70589, Mar 29 2021, 22:53:15 0:05:26 load avg: 3.95 [426/427] test_tokenize passed (56.0 sec) -- running: test_asyncio

[issue37368] test_asyncio: test_create_server_ssl_match_failed() failed on s390x SLES 3.x and logged an unraisable exception

2021-03-30 Thread Neil Schemenauer
Neil Schemenauer added the comment: It seems to not be specific to S390, same kind of failure on the PPC64LE RHEL8 LTO + PGE 3.x tester: Exception ignored in: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cst

[issue43593] pymalloc is not aware of Memory Tagging Extension (MTE) and crashes

2021-03-31 Thread Neil Schemenauer
Neil Schemenauer added the comment: > If MTE is actually being used, system software assigns "random" values to 4 > of the higher-order bits. Oh, interesting. Two ideas about handling that: we could change our assertion check to be different on ARM platforms that we kno

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-25 Thread Neil Schemenauer
Change by Neil Schemenauer : -- nosy: +nascheme ___ Python tracker <https://bugs.python.org/issue42972> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44331] Generate static PyCodeObjects for faster startup

2021-06-06 Thread Neil Schemenauer
New submission from Neil Schemenauer : Note: This is a proof of concept and not ready for merging as is. This is based on 'frozen_modules' from Jeethu Rao , via Larry Hastings. Larry's git branch was: g...@github.com:larryhasti

[issue44331] Generate static PyCodeObjects for faster startup

2021-06-06 Thread Neil Schemenauer
Change by Neil Schemenauer : -- keywords: +patch pull_requests: +25161 pull_request: https://github.com/python/cpython/pull/26571 ___ Python tracker <https://bugs.python.org/issue44

[issue44523] weakref.proxy documentation might be outdated

2021-06-29 Thread Neil Schemenauer
Neil Schemenauer added the comment: It seems to me the old behaviour (don't forward hash) was done for good reasons. If the referent might go away, it is not valid to use it as a dict key since the hash and eq result changes. If it can't go away, what reason is there to use a w

[issue43384] Include regen-stdlib-module-names in regen-all

2021-07-05 Thread Neil Schemenauer
Change by Neil Schemenauer : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44881] Consider integration of GC_UNTRACK with TRASHCAN

2021-08-10 Thread Neil Schemenauer
New submission from Neil Schemenauer : The fix for bpo-33930 includes a somewhat mysterious comment: // The Py_TRASHCAN mechanism requires that we be able to // call PyObject_GC_UnTrack twice on an object. I wonder if we can just integrate the untrack into the body of the trashcan

[issue33930] Segfault with deep recursion into object().__dir__

2021-08-10 Thread Neil Schemenauer
Neil Schemenauer added the comment: I'm thinking that the explicit call to PyObject_GC_UnTrack should be made unnecessary by integrating it into the trashcan code. That way, we avoid someone else running into this kind of bug in the future. See bpo-44881. -- nosy: +nas

[issue44881] Consider integration of GC_UNTRACK with TRASHCAN

2021-08-10 Thread Neil Schemenauer
Change by Neil Schemenauer : -- keywords: +patch pull_requests: +26201 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/27718 ___ Python tracker <https://bugs.python.org/issu

[issue44881] Consider integration of GC_UNTRACK with TRASHCAN

2021-08-10 Thread Neil Schemenauer
Neil Schemenauer added the comment: Extensions that call PyObject_GC_UnTrack before calling Py_TRASHCAN_BEGIN will still work, they will just take a very minor performance hit. I don't think it is worth the trouble to introduce new macros for that reason. Extensions that really care

[issue44881] Consider integration of GC_UNTRACK with TRASHCAN

2021-08-10 Thread Neil Schemenauer
Neil Schemenauer added the comment: For examples of bugs caused by forgetting the untrack calls, see bpo-31095. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44881] Consider integration of GC_UNTRACK with TRASHCAN

2021-08-10 Thread Neil Schemenauer
Neil Schemenauer added the comment: Since C99 is now allowed, perhaps we should suggest that declarations go after Py_TRASHCAN_BEGIN, e.g. mytype_dealloc(mytype *p) { Py_TRASHCAN_BEGIN(p, mytype_dealloc) ... declarations go here ... ... The

[issue44881] Consider integration of PyObject_GC_UnTrack() with the trashcan C API

2021-08-11 Thread Neil Schemenauer
Neil Schemenauer added the comment: I was thinking about this more today and I think the better fix is to actually build the trashcan mechanism into _Py_Dealloc(). Requiring that types opt-in to the trashcan mechanism by using the trashcan macros is not ideal. First, the trashcan macros

[issue44897] Integrate trashcan mechanism into _Py_Dealloc

2021-08-11 Thread Neil Schemenauer
New submission from Neil Schemenauer : This is a WIP/proof-of-concept of doing away with Py_TRASHCAN_BEGIN and Py_TRASHCAN_END and instead integrating the functionality into _Py_Dealloc. There are a few advantages: - all container objects have the risk of overflowing the C stack if a long

[issue44897] Integrate trashcan mechanism into _Py_Dealloc

2021-08-11 Thread Neil Schemenauer
Change by Neil Schemenauer : -- keywords: +patch pull_requests: +26218 pull_request: https://github.com/python/cpython/pull/27738 ___ Python tracker <https://bugs.python.org/issue44

[issue44881] Consider integration of PyObject_GC_UnTrack() with the trashcan C API

2021-08-11 Thread Neil Schemenauer
Neil Schemenauer added the comment: I wrote a proof-of-concept as bpo-44897. PR 27718 (this issue) might a slightly better performance but I like the other one better because it doesn't expose so much implementation detail to extension types. Either of them require careful review b

[issue44881] Consider integration of PyObject_GC_UnTrack() with the trashcan C API

2021-08-12 Thread Neil Schemenauer
Neil Schemenauer added the comment: > The problem of PyObject_GC_UnTrack() is just the most visible effect of the > trashcan mecanism: tp_dealloc can be called twice, and this is *not* expected > by the tp_dealloc API. The fact that Py_TRASHCAN_BEGIN and Py_TRASHCAN_END can cause t

[issue44881] Consider integration of PyObject_GC_UnTrack() with the trashcan C API

2021-08-13 Thread Neil Schemenauer
Neil Schemenauer added the comment: > I think in any case we should benchmark this because this will affect *all* > GC types if I understand correctly and the TS mechanism had shown slowdowns > before We definitely need to benchmark. I would guess that adding trashcan protection

  1   2   3   4   >