cpython/Misc/NEWS.d
Miss Skeleton (bot) 47ca679972
bpo-41894: Fix UnicodeDecodeError while loading native module (GH-22466)
When running in a non-UTF-8 locale, if an error occurs while importing a
native Python module (say because a dependent share library is missing),
the error message string returned may contain non-ASCII code points
causing a UnicodeDecodeError.

PyUnicode_DecodeFSDefault is used for buffers which may contain
filesystem  paths. For consistency with os.strerror(),
PyUnicode_DecodeLocale is used for buffers which contain system error
messages. While the shortname parameter is always encoded in ASCII
according to PEP 489, it is left decoded using PyUnicode_FromString to
minimize the changes and since it should not affect the decoding (albeit
_potentially_ slower).

In dynload_hpux, since the error buffer contains a message generated
from a static ASCII string and the module filesystem path,
PyUnicode_DecodeFSDefault is used instead of PyUnicode_DecodeLocale as
is used elsewhere.

* bpo-41894: Fix bugs in dynload error msg handling

For both dynload_aix and dynload_hpux, properly handle the possibility
that decoding strings may return NULL and when such an error happens,
properly decrement any previously decoded strings and return early.

In addition, in dynload_aix, ensure that we pass the decoded string
*object* pathname_ob to PyErr_SetImportError instead of the original
pathname buffer.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 2d2af320d9)

Co-authored-by: Kevin Adler <kadler@us.ibm.com>
2020-10-14 19:11:08 -07:00
..
next bpo-41894: Fix UnicodeDecodeError while loading native module (GH-22466) 2020-10-14 19:11:08 -07:00
3.5.0.rst
3.5.0a1.rst Fix typos mostly in comments, docs and test names (GH-15209) 2019-08-30 13:42:54 -07:00
3.5.0a2.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.5.0a3.rst
3.5.0a4.rst
3.5.0b1.rst
3.5.0b2.rst
3.5.0b3.rst
3.5.0b4.rst
3.5.0rc1.rst
3.5.0rc2.rst
3.5.0rc3.rst
3.5.0rc4.rst
3.5.1.rst
3.5.1rc1.rst
3.5.2.rst
3.5.2rc1.rst [3.8] Fix typos in docs, comments and test assert messages (GH-14872). (#14900) 2019-07-21 22:48:45 -04:00
3.5.3.rst
3.5.3rc1.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.5.4.rst
3.5.4rc1.rst Fix typos mostly in comments, docs and test names (GH-15209) 2019-08-30 13:42:54 -07:00
3.5.5.rst
3.5.5rc1.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.6.0.rst
3.6.0a1.rst [3.8] Fix typos in docs, comments and test assert messages (GH-14872). (#14900) 2019-07-21 22:48:45 -04:00
3.6.0a2.rst
3.6.0a3.rst
3.6.0a4.rst
3.6.0b1.rst Fix typos mostly in comments, docs and test names (GH-15209) 2019-08-30 13:42:54 -07:00
3.6.0b2.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.6.0b3.rst
3.6.0b4.rst
3.6.0rc1.rst Fix typos mostly in comments, docs and test names (GH-15209) 2019-08-30 13:42:54 -07:00
3.6.0rc2.rst
3.6.1.rst
3.6.1rc1.rst Fix typos mostly in comments, docs and test names (GH-15209) 2019-08-30 13:42:54 -07:00
3.6.2.rst
3.6.2rc1.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.6.2rc2.rst
3.6.3.rst
3.6.3rc1.rst [3.8] Fix typos in docs, comments and test assert messages (GH-14872). (#14900) 2019-07-21 22:48:45 -04:00
3.6.4.rst
3.6.4rc1.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.6.5.rst
3.6.5rc1.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.6.6.rst
3.6.6rc1.rst
3.7.0.rst
3.7.0a1.rst Fix typos mostly in comments, docs and test names (GH-15209) 2019-08-30 13:42:54 -07:00
3.7.0a2.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.7.0a3.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.7.0a4.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.7.0b1.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.7.0b2.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.7.0b3.rst
3.7.0b4.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.7.0b5.rst
3.7.0rc1.rst
3.8.0.rst [3.8] Fix typos in Misc/NEWS.d (GH-17930) 2020-01-13 00:56:26 +02:00
3.8.0a1.rst [3.8] Remove duplicated words words (GH-20413). (GH-22297) 2020-09-18 09:37:04 +03:00
3.8.0a2.rst Minor edits to news entries (ported from 3.7) (GH-12293) 2019-03-12 12:21:22 -04:00
3.8.0a3.rst IDLE: changelog correction and addition (GH-15042) 2019-07-30 22:42:17 -07:00
3.8.0a4.rst Fix typos mostly in comments, docs and test names (GH-15209) 2019-08-30 13:42:54 -07:00
3.8.0b1.rst [3.8] Remove duplicated words words (GH-20413). (GH-22297) 2020-09-18 09:37:04 +03:00
3.8.0b2.rst Python 3.8.0b2 2019-07-04 12:50:19 +02:00
3.8.0b3.rst [3.8] Fix typo (inifite -> infinite) (GH-15429) 2019-08-23 09:23:43 -07:00
3.8.0b4.rst Python 3.8.0b4 2019-08-29 23:59:20 +02:00
3.8.0rc1.rst v3.8.0rc1 2019-10-01 14:58:26 +02:00
3.8.1.rst [3.8] Fix typos in Misc/NEWS.d (GH-17930) 2020-01-13 00:56:26 +02:00
3.8.1rc1.rst [3.8] bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594) 2020-07-23 04:18:03 -04:00
3.8.2.rst Python 3.8.2 2020-02-24 22:36:25 +01:00
3.8.2rc1.rst Python 3.8.2rc1 2020-02-10 20:08:24 +01:00
3.8.2rc2.rst Python 3.8.2rc2 2020-02-17 23:45:14 +01:00
3.8.3.rst Python 3.8.3 2020-05-13 19:31:54 +02:00
3.8.3rc1.rst Python 3.8.3rc1 2020-04-29 19:21:55 +02:00
3.8.4.rst Python 3.8.4 2020-07-13 14:11:53 +02:00
3.8.4rc1.rst Python 3.8.4rc1 2020-06-30 00:30:11 +02:00
3.8.5.rst Python 3.8.5 2020-07-20 15:01:32 +02:00
3.8.6.rst Python 3.8.6 2020-09-23 14:36:32 +02:00
3.8.6rc1.rst Python 3.8.6rc1 2020-09-07 17:52:19 +02:00