This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Albert.Zeyer
Recipients Albert.Zeyer
Date 2014-01-16.01:20:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1389835250.18.0.994187095124.issue20276@psf.upfronthosting.co.za>
In-reply-to
Content
On MacOSX, when you build an ARC-enabled Dylib with backward compatibility for e.g. MacOSX 10.6, some unresolved functions like `_objc_retainAutoreleaseReturnValue` might end up in your Dylib.

Some reference about the issue:
1. http://stackoverflow.com/q/21119425/133374>.
2. http://osdir.com/ml/python.ctypes/2006-10/msg00029.html
3. https://groups.google.com/forum/#!topic/comp.lang.python/DKmNGwyLl3w

Thus, RTLD_NOW is often not an option for MacOSX.

This affects mostly `py_dl_open()` from ctypes.
But it is also related how you set `dlopenflags` in `PyInterpreterState_New()`.

I suggest to make RTLD_LAZY the default on MacOSX (or is there a good reason not to do?).
Also, ctypes should have options for both RTLD_NOW and RTLD_LAZY so that both can be used.

This is also consistent with the behavior of the [dl module](http://docs.python.org/2/library/dl.html).
History
Date User Action Args
2014-01-16 01:20:50Albert.Zeyersetrecipients: + Albert.Zeyer
2014-01-16 01:20:50Albert.Zeyersetmessageid: <1389835250.18.0.994187095124.issue20276@psf.upfronthosting.co.za>
2014-01-16 01:20:49Albert.Zeyerlinkissue20276 messages
2014-01-16 01:20:48Albert.Zeyercreate