[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2020-03-26 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2020-03-26 Thread Steve Dower


Steve Dower  added the comment:


New changeset 79ceccd1ec6ef7e487da2916f32c6f0d1477bd3d by Zackery Spytz in 
branch 'master':
bpo-38410: Properly handle PySys_Audit() failures (GH-16657)
https://github.com/python/cpython/commit/79ceccd1ec6ef7e487da2916f32c6f0d1477bd3d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2020-03-26 Thread Steve Dower


Steve Dower  added the comment:

Sorry for missing the pings! My GitHub notifications are a bit of a black hole. 
I'll merge it now.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2020-03-26 Thread Zackery Spytz


Zackery Spytz  added the comment:

I had pinged Steve Dower on the PR, but I didn't realize they weren't notified. 
The merge conflicts have been fixed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2020-03-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 87a4cd5fbebdd0e6166b421d2c3706bc2f2e5a11 by Serhiy Storchaka in 
branch '3.8':
bpo-38410: Properly handle PySys_Audit() failures (GH-18658)
https://github.com/python/cpython/commit/87a4cd5fbebdd0e6166b421d2c3706bc2f2e5a11


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2020-02-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PR 18658 is a backport to 3.8 which preserves binary compatibility.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2020-02-25 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +18019
pull_request: https://github.com/python/cpython/pull/18658

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2020-02-25 Thread Steve Dower


Steve Dower  added the comment:

I thought we weren't going to take the fix for 3.8 anyway? (Or did we make a 
smaller one and commit it directly, apparently without linking it to the issue 
correctly?)

The status is the PR needs conflicts resolved, and people need to stop adding 
to my infinite list of GitHub notifications and ping me on here instead :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2020-02-25 Thread Łukasz Langa

Łukasz Langa  added the comment:

Sadly, this missed the train for 3.8.2. Steve, what's the status of the open PR 
for this?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2019-12-09 Thread Łukasz Langa

Łukasz Langa  added the comment:

Note: this is going to miss Python 3.8.1 as I'm releasing 3.8.1rc1 right now.  
Please address this before 3.8.2 (due in February).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2019-10-18 Thread Steve Dower


Steve Dower  added the comment:

> Why this ABI is exported at all?

Great question for (probably) Yury, but it is exported and so we're stuck with 
it for 3.8 at least :(

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2019-10-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Why this ABI is exported at all? These functions are only used in the sys 
module, why they are defined in ceval.c instead of be static functions in 
sysmodule.c?

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2019-10-14 Thread Steve Dower


Steve Dower  added the comment:

But I'm okay to defer it - this is still going to be obscure functionality for 
the time being, and it's possible to avoid the issue.

--
priority: release blocker -> deferred blocker

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2019-10-14 Thread Steve Dower


Steve Dower  added the comment:

In that case, the fix for 3.8 should be to call PyErr_WriteUnraisable(NULL) 
when an error occurs. This will report it through the new unraisable hook, and 
also prevent a fatal error if the exception escapes.

--
versions: +Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2019-10-13 Thread Łukasz Langa

Łukasz Langa  added the comment:

Unfortunately at this point we will have to leave the ABI as is. We are in fact 
promising to lock it by Beta 3 so quite a long time ago.

--
versions:  -Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2019-10-08 Thread Steve Dower

Steve Dower  added the comment:

You're right, they need either your patch or PyErr_WriteUnraisable(NULL) before 
returning.

Łukasz - this needs a fix in 3.8, but we don't have to necessarily change the 
(internal, but exposed) ABI. For 3.9, we'll fix it properly, but for 3.8 I'll 
let you make the call whether we can also add a return value to these functions.

-PyAPI_FUNC(void) _PyEval_SetAsyncGenFirstiter(PyObject *);
+PyAPI_FUNC(int) _PyEval_SetAsyncGenFirstiter(PyObject *);
 PyAPI_FUNC(PyObject *) _PyEval_GetAsyncGenFirstiter(void);
-PyAPI_FUNC(void) _PyEval_SetAsyncGenFinalizer(PyObject *);
+PyAPI_FUNC(int) _PyEval_SetAsyncGenFinalizer(PyObject *);

--
keywords: +newcomer friendly
nosy: +lukasz.langa
priority: normal -> release blocker

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2019-10-08 Thread Zackery Spytz


New submission from Zackery Spytz :

_PyEval_SetAsyncGenFinalizer() and _PyEval_SetAsyncGenFirstiter() don't include 
proper error handling for their PySys_Audit() calls. This could lead to leaked 
exceptions and fatal errors.

--
components: Interpreter Core
messages: 354210
nosy: ZackerySpytz
priority: normal
severity: normal
status: open
title: Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer,Firstiter}()
type: crash
versions: Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2019-10-08 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +steve.dower

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2019-10-08 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +16240
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16657

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com