This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libstdc++ / mt_allocator.cc when using gthreads


Hi,
All,

The enclosed testcases (very close to ext/mt_allocator/deallocate_global_thread-1.cc) exposes a pattern where the following sequence is called (when __gthread_active_p is enabled) :

    __gthread_key_create(&key,::_M_destroy_thread_key);
    __gthread_setspecific(key, (void*)_M_id);
    __gthread_key_delete(key);
    __gthread_setspecific(key, (void*)_M_id);
I didn't look into the issue in any detail - and I'm really glad that you are interested in improving mt_allocator - but I think that before going for quick patches, we should strive for fixing the underlying issue, eg prevent the above from occurring. After all, if you are right, the issue is very, very old, and nobody complained yet, thus better try very hard to fix it for real, finally. Do you have any plans for that?

Thanks,
Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]