[Python-checkins] r53420 - in python/trunk: Lib/sqlite3/dbapi2.py Lib/sqlite3/test/factory.py Lib/sqlite3/test/regression.py Lib/sqlite3/test/types.py Modules/_sqlite/cache.c Modules/_sqlite/cache.h Modules/_sqlite/connection.c Modules/_sqlite/connection.h Modules/_sqlite/cursor.c Modules/_sqlite/cursor.h Modules/_sqlite/microprotocols.c Modules/_sqlite/microprotocols.h Modules/_sqlite/module.c Modules/_sqlite/module.h Modules/_sqlite/prepare_protocol.c Modules/_sqlite/prepare_protocol.h Modules/_sqlite/row.c Modules/_sqlite/row.h Modules/_sqlite/statement.c Modules/_sqlite/statement.h Modules/_sqlite/util.c Modules/_sqlite/util.h

Gerhard Häring gh at ghaering.de
Sun Jan 14 14:14:32 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin v. Löwis wrote:
> gerhard.haering schrieb:
>> - gcc on Linux sucks. It exports all symbols by default in shared
>> libraries, so if symbols are not unique it can lead to problems with
>> symbol lookup. pysqlite used to crash under Apache when mod_cache
>> was enabled because both modules had the symbol cache_init. I fixed
>> this by applying the prefix pysqlite_ almost everywhere. Sigh.
>> The right reaction should have been to make more symbols static; that
> includes cache_init. Static symbols don't conflict dynamically. They
> are guaranteed to be visible only in the translation unit (i.e. C file)
> where they are defined.

Unfortunately, I have a lot of cross-translation-unit calls in the sqlite3
module. That's because basically for each object (Connection, Cursor,
Cache, Statement) there is a separate .c and .h file. The functions that
set up the types (like cache_init) are all called from the module file
module.c.
> Also, it's not gcc which sucks but Apache. Python loads extension
> modules with RTLD_LOCAL, causing all symbols of the module to be
> encapsulated and not available for relocation of other shared objects.
> If Apache would have also used RTLD_LOCAL to load its own modules,
> this problem would not exist.

Ok, that makes sense to me.
- -- Gerhard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFqiy4dIO4ozGCH14RAiMXAKCKu19nzKVbN/1V6s9obFqMGIWcmQCgn1hp
hQyWNojJxWQoTRhgdrcSD8k=
=anN1
-----END PGP SIGNATURE-----


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /