Bugs item #1119866, was opened at 2005-02-10 08:40 Message generated for change (Settings changed) made by ekloef You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1119866&group_id=5470
Category: Threads Group: None >Status: Deleted Resolution: None Priority: 5 Submitted By: daniel (ekloef) Assigned to: Nobody/Anonymous (nobody) Summary: Static library incompatible with nptl Initial Comment: When compiling on a linux system, the python lock structure contains three variables, the lock, a mutex and a condition variable. On systems where linuxthreads are used, sizeof(pthread_cond_t) == 12, but on nptl systems sizeof(pthread_cond_t) == 48. Why is this a problem? Lets say you compile the static library on an old system. Then the smaller pthread_cond_t will be used. If an application links against this library and is run on a newer system, ugly things will happen: only 12 bytes (+ the rest of the lock structure) is allocated, but the pthread functions will expect it to be 48 bytes... seg. fault. Note that this problem only occurs when using a static library, compiled on a linuxthreads system, and running on a nptl system. Attached is a simple fix; a padding buffer is inserted into the python lock structure. This ensures enough memory is allocated. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1119866&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com