This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug libc/16291] feature request: provide simpler ways to compute stack and tls boundaries


https://sourceware.org/bugzilla/show_bug.cgi?id=16291

Kostya Serebryany <konstantin.s.serebryany at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unspecified                 |2.19
   Target Milestone|---                         |2.20

--- Comment #19 from Kostya Serebryany <konstantin.s.serebryany at gmail dot com> ---
I've implemented a very ugly hack to handle dynamic TLS in both <=2.18 and 2.19
(intercept __tls_get_addr and make lots of assumptions:
http://llvm.org/viewvc/llvm-project?rev=200384&view=rev)

However I kindly ask to resolve this issue in the right way before 2.20,
so setting the target milestone accordingly. 

To summarize my current view of the required interface:

// Get the stack bounds for the current thread. 
// For main thread, the value of stack_beg is undefined.
void __libc_get_stack_bounds(void **stack_beg, void **stack_end);

// Get the bounds of static tls for the current thread.
void __libc_get_static_tls_bounds(void **stls_beg, void **stls_end);

// These functions are called by glibc when a dynamic TLS is created/destroyed
in 
// the current thread. By default the functions do nothing, and the user may 
// redefine them.
__libc_on_dynamic_tls_create(void *beg, void *end);
__libc_on_dynamic_tls_destroy(void *beg, void *end);

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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