cpython/Misc
Bénédikt Tran 6ac578cf53
[3.12] gh-126554: ctypes: Correctly handle NULL dlsym values (GH-126555) (GH-127764)
For dlsym(), a return value of NULL does not necessarily indicate
an error [1].

Therefore, to avoid using stale (or NULL) dlerror() values, we must:

 1. clear the previous error state by calling dlerror()
 2. call dlsym()
 3. call dlerror()

If the return value of dlerror() is not NULL, an error occured.

In ctypes we choose to treat a NULL return value from dlsym()
as a "not found" error. This is the same as the fallback
message we use on Windows, Cygwin or when getting/formatting
the error reason fails.

[1]: https://man7.org/linux/man-pages/man3/dlsym.3.html

Signed-off-by: Georgios Alexopoulos <grgalex42@gmail.com>
Signed-off-by: Georgios Alexopoulos <grgalex@ba.uoa.gr>
Co-authored-by: George Alexopoulos <giorgosalexo0@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-12-17 13:53:43 +02:00
..
NEWS.d [3.12] gh-126554: ctypes: Correctly handle NULL dlsym values (GH-126555) (GH-127764) 2024-12-17 13:53:43 +02:00
rhel7 gh-95957: Add instructions for Tcl/Tk and OpenSSL on RHEL/CentOS 7 (#95964) 2022-08-16 13:44:02 +02:00
ACKS [3.12] gh-127303: Add docs for token.EXACT_TOKEN_TYPES (GH-127304) (#127391) 2024-11-29 09:22:27 +00:00
coverity_model.c [3.12] Fix typos (#123775) (#123867) 2024-09-09 13:22:13 +00:00
externals.spdx.json [3.12] gh-124448: Update Windows builds to use Tcl/Tk 8.6.15 (GH-125796) 2024-10-21 21:44:56 -05:00
HISTORY [3.12] gh-123492: Remove unnecessary :func: parentheses (gh-123493) (#123512) 2024-08-30 20:09:55 +03:00
indent.pro
Porting
python-config.in
python-config.sh.in
python-embed.pc.in
python.man [3.12] gh-121101: Document -Wall option (an alias for -Walways) (GH-121102) (#121147) 2024-06-29 13:57:22 +05:30
python.pc.in gh-99942: python.pc on android/cygwin should link to libpython per configure.ac (GH-100356) 2023-02-21 17:21:24 -08:00
README gh-102809: Remove gdbinit mention in Misc/README (#103269) 2023-04-08 00:04:23 -07:00
README.AIX bpo-42087: Remove support for AIX 5.3 and below (GH-22830) 2020-11-16 16:16:10 +01:00
README.coverity
README.valgrind closes docs: remove references to Py_USING_MEMORY_DEBUGGER (GH-30284) 2021-12-29 16:20:42 -06:00
sbom.spdx.json [3.12] gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792) (GH-126797) 2024-11-13 18:50:29 +00:00
SpecialBuilds.txt gh-78607: Replace __ltrace__ with __lltrace__ (GH-91619) 2022-04-16 18:57:00 -04:00
stable_abi.toml [3.12] gh-102304: Fix Py_INCREF() stable ABI in debug mode (#104763) (#105352) 2023-06-06 16:22:04 +02:00
svnmap.txt
valgrind-python.supp [3.12] gh-121096: Ignore dlopen() leaks in Valgrind suppression file (GH-121097) (#121123) 2024-06-28 11:17:30 +00:00
vgrindefs

Python Misc subdirectory
========================

This directory contains files that wouldn't fit in elsewhere.  Some
documents are only of historic importance.

Files found here
----------------

ACKS                    Acknowledgements
HISTORY                 News from previous releases -- oldest last
indent.pro              GNU indent profile approximating my C style
NEWS                    News for this release (for some meaning of "this")
Porting                 Mini-FAQ on porting to new platforms
python-config.in        Python script template for python-config
python.man              UNIX man page for the python interpreter
python.pc.in            Package configuration info template for pkg-config
README                  The file you're reading now
README.AIX              Information about using Python on AIX
README.coverity         Information about running Coverity's Prevent on Python
README.valgrind         Information for Valgrind users, see valgrind-python.supp
SpecialBuilds.txt       Describes extra symbols you can set for debug builds
svnmap.txt              Map of old SVN revs and branches to hg changeset ids,
                        help history-digging
valgrind-python.supp    Valgrind suppression file, see README.valgrind
vgrindefs               Python configuration for vgrind (a generic pretty printer)