[Python-Dev] ctypes/utils.py problem (original) (raw)
Brett Cannon brett at python.org
Thu Feb 9 01:48:26 CET 2012
- Previous message: [Python-Dev] ctypes/utils.py problem
- Next message: [Python-Dev] [Python-checkins] cpython: PEP 410
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Could you file a bug at bugs.python.org, David, so we don't lose track of this?
On Wed, Feb 8, 2012 at 18:03, David Goulet <dgoulet at efficios.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi everyone, I'm working with the LTTng (Linux Tracing) team and we came across a problem with our user-space tracer and Python default behavior. We provide a libc wrapper that instrument free() and malloc() with a simple ldpreload of that lib. This lib was named "liblttng-ust-libc.so" and we came across python software registering to our trace registry daemon (meaning that somehow the python binary is using our in-process library). We dig a bit and found this: Lib/ctypes/utils.py: def findLibldconfig(name): # XXX assuming GLIBC's ldconfig (with option -p) expr = r'/[^()\s]lib%s.[^()\s]' % re.escape(name) res = re.search(expr, os.popen('/sbin/ldconfig -p 2>/dev/null').read()) and, at least, also found in findLibgcc(name) and findSonameldconfig(name). This cause Python to use any library ending with "libc.so" to be loaded.... I don't know the reasons behind this but we are concerned about "future issues" that can occur with this kind of behavior. For now, we renamed our lib so everything is fine. Thanks a lot guys. David -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQEcBAEBAgAGBQJPMv9BAAoJEELoaioR9I02jwkIALmLg0esubJL+TrZFEahNwz7 85RUKSa/GKDx2sagsi62PWy5RfvRABs5Ij6ldtyQoszyuZuOlM5B7rMrpDvO588P WqO1lzT6rdO9uyq2B6vPZRjjAr++StLKyIBbQodQd8PJkEsdN0kJISdRgIrSFL/E 0+2aUllrRgsVxc/oOF2LG+u7828iAYPfB71pC4euj2PgiwffZZ6J5gH4Q+mrUqt0 KiYU5X+vCEzWLv+ZLtq+h2rVrLNk8cFTL5N092iMwFfooSC70urD5a0cTR6pf/iI UfFvuIVROsqiT2MwQxHApyChkrLnX0eWDPdeZZAFjnWVm4QPy8q09m6qX5eHloA= =9wj8 -----END PGP SIGNATURE-----
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/brett%40python.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120208/c1f00ac0/attachment.html>
- Previous message: [Python-Dev] ctypes/utils.py problem
- Next message: [Python-Dev] [Python-checkins] cpython: PEP 410
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]