Skip to content

Conversation

@ma8ma
Copy link
Owner

@ma8ma ma8ma commented Jul 14, 2017

This is a draft which proposed updates that will be appended to the opened PR 1362.

https://bugs.python.org/issue25658
https://www.python.org/dev/peps/pep-0539/

Highlight of changes

  • bpo-25658: Omit PyThread_ReInitTSS function
  • bpo-25658: Omit PyThread_tss_delete_value function

These functions have handled memory deallocation to key-value storage on the own implementation, but currently the own implementation is gone (aa0aa04). It means: (1) PyThread_ReInitTSS makes to be no-op for all supported platforms (Windows and pthreads); likewise (2) PyThread_tss_delete_value just does to empty the storage (i.e. "PyThread_tss_delete_value(key)" makes to be equal to "PyThread_tss_set(key, NULL)").
We (or at least I) won't get back to the own implementation, therefore, I suggest to omit these functions for new TSS API.

ma8ma added 3 commits July 13, 2017 23:24
After aa0aa04, the own implementation for TLS is gone and
PyThread_ReInitTSS function has made to be no-op for all supported
platforms (Windows and pthreads).
After aa0aa04, the own implementation for TLS is gone and
PyThread_tss_delete_value function just does to empty the storage
(i.e. "PyThread_tss_delete_value(key)" has made to be equal to
"PyThread_tss_set(key, NULL)").
@embray
Copy link

embray commented Jul 18, 2017

Makes sense to me!

@ma8ma ma8ma merged commit ba04cef into pep539-tss-api Jul 19, 2017
@ma8ma ma8ma deleted the bpo-25658-pep539-tss-api.pu branch July 20, 2017 14:18
ma8ma pushed a commit that referenced this pull request Aug 31, 2017
* Added support for CAN_ISOTP protocol

* Added unit tests for CAN ISOTP

* Updated documentation for ISO-TP protocol

* Removed trailing whitespace in documentation

* Added blurb NEWS.d file

* updated Misc/ACKS

* Fixed broken unit test that was using isotp const outside of skippable section

* Removed dependecy over third party project

* Added implementation for getsockname + unit tests

* Missing newline at end of ACKS file

* Accidentally inserted a type in ACKS file

* Followed tiran changes review #1 recommendations

* Added spaces after comma
ma8ma pushed a commit that referenced this pull request May 14, 2022
…python#91466)

Fix an uninitialized bool in exception print context.
    
`struct exception_print_context.need_close` was uninitialized.
    
Found by oss-fuzz in a test case running under the undefined behavior sanitizer.
    
https://oss-fuzz.com/testcase-detail/6217746058182656
    
```
Python/pythonrun.c:1241:28: runtime error: load of value 253, which is not a valid value for type 'bool'
    #0 0xbf2203 in print_chained cpython3/Python/pythonrun.c:1241:28
    #1 0xbea4bb in print_exception_cause_and_context cpython3/Python/pythonrun.c:1320:19
    #2 0xbea4bb in print_exception_recursive cpython3/Python/pythonrun.c:1470:13
    #3 0xbe9e39 in _PyErr_Display cpython3/Python/pythonrun.c:1517:9
```
    
Pretty obvious what the ommission was upon code inspection.
ma8ma pushed a commit that referenced this pull request Sep 10, 2023
…es (#1… (python#108688)

This reverts commit 08447b5.

Revert also _ctypes.c changes of the PyDict_ContainsString() change,
commit 6726626.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants