Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 11 Feb 2013 13:51:11 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: [PATCH v3] move the definition of __pthread_tsd_main to
 the only compilation unit that references it

* Jens Gustedt <jens.gustedt@...ia.fr> [2013-02-11 13:24:07 +0100]:
> 
> In case of dynamic linking, this sounds a bit dangerous to me. Suppose
> I have a program that runs fine, without linking to the key stuff. Say
> it launches a new thread which then has the key table invalid.
> 
> Then I dynamically load a module that uses keys. The thread that has
> an invalid table jumps into a function of that module that calles
> pthread_key_get() ?
> 
> In such a scenario everything would simply crash, wouldn't it?
> 

this weak alias magic only works for static linking
since the .so has non-weak version of the symbols

(the non-weak symbols will take precedence and only
those will be added to the .so, but in .a there will
be objects with weak symbols and objects with non-weak
ones and linker will do the right thing)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.