dlopen and memory order guarantees with threads

edA-qa mort-ora-y eda-qa@disemia.com
Sat Mar 3 21:16:00 GMT 2012

On 03/03/2012 08:28 PM, Carlos O'Donell wrote:
> No, it's not that specific. The loader relies on mmap to provide all
> visibility guarantees for all threads in a process. Nothing more.
> There is no specification that makes the guarantee because doing so
> would tie the specification to a strict set of requirements that might
> contradict what is required to achieve optimal performance for a given
> architecture or OS.

Okay, so that does mean there could be (at least theoretically) OS's
and/or hardware where dlopen/dlsym could actually provide a pointer to
an address not visible, or not current, on another processor? Is there
such a system?

But surely then the kernel docs would make mention of this, wouldn't
they? Say for example Linux must state somewhere precisely mmap handles,
or is it more of an information expected guarantee at this point
(considering how hard it'd be to use dlopen safely otherwise)?

Sorry that I may be sounding quite picky about details. I've been doing
a lot of low-level concurrent programming lately and am always trying to
ensure I'm doing it absolutely correctly. There's a lot of incomplete
details in this area it seems -- probably because exactly what is
required is not 100% certain, and because it seems there is still a
disagreement on division of work between hardware and OS.

edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/libc-help/attachments/20120303/d4ecf318/attachment.sig>

More information about the Libc-help mailing list