* cygtls.h (TP_NUM_C_BUFS): Raise to 50 to allow SYMLOOP_MAX recursions

path_conv <-> normalize_posix_path, plus a bit of buffer.
	(TP_NUM_W_BUFS): Ditto.
	(class san): Change type of _c_cnt and _w_cnt to unsigned.
	* path.cc (normalize_posix_path): Guard recursion into path_conv
	against tmp_pathbuf overflow.  Generate normalized path in call to
	path_conv.  If the path is valid, replace dst with the normalized_path
	from path_conv call.  Add comment to explain why we're doing this.
	* tls_pbuf.cc (tls_pathbuf::destroy): Only free buffers until the
	first buffer pointer is NULL.
	(tmp_pathbuf::c_get): Simplify error message.
	(tmp_pathbuf::w_get): Ditto.
	* tls_pbuf.h (class tmp_pathbuf): Change type of c_buf_old and w_buf_old
	to unsigned.
	(tmp_pathbuf::check_usage): New inline method to check if we have
	enough tmp_pathbuf buffers left to call a function using tmp_pathbuf
	buffers.
	* tlsoffsets.h: Regenerate.
	* tlsoffsets64.h: Regenerate.
This commit is contained in:
Corinna Vinschen 2014-04-18 14:29:49 +00:00
parent d98d7f3973
commit 7ae3e6b3d4
8 changed files with 282 additions and 233 deletions

View File

@ -1,3 +1,25 @@
2014-04-17 Corinna Vinschen <corinna@vinschen.de>
* cygtls.h (TP_NUM_C_BUFS): Raise to 50 to allow SYMLOOP_MAX recursions
path_conv <-> normalize_posix_path, plus a bit of buffer.
(TP_NUM_W_BUFS): Ditto.
(class san): Change type of _c_cnt and _w_cnt to unsigned.
* path.cc (normalize_posix_path): Guard recursion into path_conv
against tmp_pathbuf overflow. Generate normalized path in call to
path_conv. If the path is valid, replace dst with the normalized_path
from path_conv call. Add comment to explain why we're doing this.
* tls_pbuf.cc (tls_pathbuf::destroy): Only free buffers until the
first buffer pointer is NULL.
(tmp_pathbuf::c_get): Simplify error message.
(tmp_pathbuf::w_get): Ditto.
* tls_pbuf.h (class tmp_pathbuf): Change type of c_buf_old and w_buf_old
to unsigned.
(tmp_pathbuf::check_usage): New inline method to check if we have
enough tmp_pathbuf buffers left to call a function using tmp_pathbuf
buffers.
* tlsoffsets.h: Regenerate.
* tlsoffsets64.h: Regenerate.
2014-04-16 Corinna Vinschen <corinna@vinschen.de>
* net.cc (cygwin_setsockopt): Ignore IPV6_TCLASS the same way as IP_TOS.

View File

@ -32,8 +32,8 @@ details. */
#include "cygthread.h"
#define TP_NUM_C_BUFS 10
#define TP_NUM_W_BUFS 10
#define TP_NUM_C_BUFS 50
#define TP_NUM_W_BUFS 50
#ifdef CYGTLS_HANDLE
#include "thread.h"
@ -290,8 +290,8 @@ class san
san *_clemente;
jmp_buf _context;
int _errno;
int _c_cnt;
int _w_cnt;
unsigned _c_cnt;
unsigned _w_cnt;
public:
int setup (int myerrno = 0) __attribute__ ((always_inline))
{

View File

@ -311,9 +311,31 @@ normalize_posix_path (const char *src, char *dst, char *&tail)
{
*tail = 0;
debug_printf ("checking %s before '..'", dst);
path_conv head (dst);
/* In conjunction with native and NFS symlinks,
this call can result in a recursion which eats
up our tmp_pathbuf buffers. This in turn results
in a api_fatal call. To avoid that, we're
checking our remaining buffers and return an
error code instead. Note that this only happens
if the path contains 15 or more relative native/NFS
symlinks with a ".." in the target path. */
tmp_pathbuf tp;
if (!tp.check_usage (4, 3))
return ELOOP;
path_conv head (dst, PC_SYM_FOLLOW | PC_POSIX);
if (!head.isdir())
return ENOENT;
/* At this point, dst is a normalized path. If the
normalized path created by path_conv does not
match the normalized path we're just testing, then
the path in dst contains native symlinks. If we
just plunge along, removing the previous path
component, we may end up removing a symlink from
the path and the resulting path will be invalid.
So we replace dst with what we found in head
instead. All the work replacing symlinks has been
done in that path anyway, so why repeat it? */
tail = stpcpy (dst, head.normalized_path);
}
check_parent = false;
}

View File

@ -17,3 +17,5 @@ What changed:
Bug Fixes
---------
- Workaround a problem following native symlinks.
Fixes: http://cygwin.com/ml/cygwin/2014-04/msg00384.html

View File

@ -1,6 +1,6 @@
/* tls_pbuf.cc
Copyright 2008, 2010 Red Hat, Inc.
Copyright 2008, 2010, 2014 Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
@ -16,12 +16,10 @@ details. */
void
tls_pathbuf::destroy ()
{
for (int i = 0; i < TP_NUM_C_BUFS; ++i)
if (c_buf[i])
free (c_buf[i]);
for (int i = 0; i < TP_NUM_W_BUFS; ++i)
if (w_buf[i])
free (w_buf[i]);
for (unsigned i = 0; i < TP_NUM_C_BUFS && c_buf[i]; ++i)
free (c_buf[i]);
for (unsigned i = 0; i < TP_NUM_W_BUFS && w_buf[i]; ++i)
free (w_buf[i]);
}
tmp_pathbuf::tmp_pathbuf ()
@ -39,7 +37,7 @@ char *
tmp_pathbuf::c_get ()
{
if (tls_pbuf.c_cnt >= TP_NUM_C_BUFS)
api_fatal ("Internal error: TP_NUM_C_BUFS too small: %u > %u", tls_pbuf.c_cnt, TP_NUM_C_BUFS);
api_fatal ("Internal error: TP_NUM_C_BUFS too small: %u", TP_NUM_C_BUFS);
if (!tls_pbuf.c_buf[tls_pbuf.c_cnt]
&& !(tls_pbuf.c_buf[tls_pbuf.c_cnt] = (char *) malloc (NT_MAX_PATH)))
api_fatal ("Internal error: Out of memory for new path buf.");
@ -50,7 +48,7 @@ PWCHAR
tmp_pathbuf::w_get ()
{
if (tls_pbuf.w_cnt >= TP_NUM_W_BUFS)
api_fatal ("Internal error: TP_NUM_W_BUFS too small %d >= %d.", tls_pbuf.w_cnt, TP_NUM_W_BUFS);
api_fatal ("Internal error: TP_NUM_W_BUFS too small: %u.", TP_NUM_W_BUFS);
if (!tls_pbuf.w_buf[tls_pbuf.w_cnt]
&& !(tls_pbuf.w_buf[tls_pbuf.w_cnt]
= (PWCHAR) malloc (NT_MAX_PATH * sizeof (WCHAR))))

View File

@ -1,6 +1,6 @@
/* tls_pbuf.h
Copyright 2008 Red Hat, Inc.
Copyright 2008, 2014 Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
@ -8,12 +8,17 @@ details. */
class tmp_pathbuf
{
int c_buf_old;
int w_buf_old;
unsigned c_buf_old;
unsigned w_buf_old;
public:
tmp_pathbuf ();
~tmp_pathbuf ();
inline bool check_usage (unsigned c_need, unsigned w_need)
{
return c_need + c_buf_old < TP_NUM_C_BUFS
&& w_need + w_buf_old < TP_NUM_W_BUFS;
}
char *c_get (); /* Create temporary TLS path buf of size NT_MAX_PATH. */
PWCHAR w_get (); /* Create temporary TLS path buf of size 2 * NT_MAX_PATH. */
inline char *t_get () { return (char *) w_get (); }

View File

@ -3,115 +3,115 @@
//; $tls::start_offset = -12700;
//; $tls::locals = -12700;
//; $tls::plocals = 0;
//; $tls::local_clib = -11300;
//; $tls::plocal_clib = 1400;
//; $tls::__dontuse = -11300;
//; $tls::p__dontuse = 1400;
//; $tls::func = -10212;
//; $tls::pfunc = 2488;
//; $tls::saved_errno = -10208;
//; $tls::psaved_errno = 2492;
//; $tls::sa_flags = -10204;
//; $tls::psa_flags = 2496;
//; $tls::oldmask = -10200;
//; $tls::poldmask = 2500;
//; $tls::deltamask = -10196;
//; $tls::pdeltamask = 2504;
//; $tls::errno_addr = -10192;
//; $tls::perrno_addr = 2508;
//; $tls::sigmask = -10188;
//; $tls::psigmask = 2512;
//; $tls::sigwait_mask = -10184;
//; $tls::psigwait_mask = 2516;
//; $tls::sigwait_info = -10180;
//; $tls::psigwait_info = 2520;
//; $tls::signal_arrived = -10176;
//; $tls::psignal_arrived = 2524;
//; $tls::will_wait_for_signal = -10172;
//; $tls::pwill_wait_for_signal = 2528;
//; $tls::thread_context = -10168;
//; $tls::pthread_context = 2532;
//; $tls::thread_id = -9956;
//; $tls::pthread_id = 2744;
//; $tls::infodata = -9952;
//; $tls::pinfodata = 2748;
//; $tls::tid = -9804;
//; $tls::ptid = 2896;
//; $tls::_ctinfo = -9800;
//; $tls::p_ctinfo = 2900;
//; $tls::andreas = -9796;
//; $tls::pandreas = 2904;
//; $tls::wq = -9792;
//; $tls::pwq = 2908;
//; $tls::sig = -9764;
//; $tls::psig = 2936;
//; $tls::incyg = -9760;
//; $tls::pincyg = 2940;
//; $tls::spinning = -9756;
//; $tls::pspinning = 2944;
//; $tls::stacklock = -9752;
//; $tls::pstacklock = 2948;
//; $tls::stackptr = -9748;
//; $tls::pstackptr = 2952;
//; $tls::stack = -9744;
//; $tls::pstack = 2956;
//; $tls::initialized = -8720;
//; $tls::pinitialized = 3980;
//; $tls::local_clib = -10980;
//; $tls::plocal_clib = 1720;
//; $tls::__dontuse = -10980;
//; $tls::p__dontuse = 1720;
//; $tls::func = -9892;
//; $tls::pfunc = 2808;
//; $tls::saved_errno = -9888;
//; $tls::psaved_errno = 2812;
//; $tls::sa_flags = -9884;
//; $tls::psa_flags = 2816;
//; $tls::oldmask = -9880;
//; $tls::poldmask = 2820;
//; $tls::deltamask = -9876;
//; $tls::pdeltamask = 2824;
//; $tls::errno_addr = -9872;
//; $tls::perrno_addr = 2828;
//; $tls::sigmask = -9868;
//; $tls::psigmask = 2832;
//; $tls::sigwait_mask = -9864;
//; $tls::psigwait_mask = 2836;
//; $tls::sigwait_info = -9860;
//; $tls::psigwait_info = 2840;
//; $tls::signal_arrived = -9856;
//; $tls::psignal_arrived = 2844;
//; $tls::will_wait_for_signal = -9852;
//; $tls::pwill_wait_for_signal = 2848;
//; $tls::thread_context = -9848;
//; $tls::pthread_context = 2852;
//; $tls::thread_id = -9636;
//; $tls::pthread_id = 3064;
//; $tls::infodata = -9632;
//; $tls::pinfodata = 3068;
//; $tls::tid = -9484;
//; $tls::ptid = 3216;
//; $tls::_ctinfo = -9480;
//; $tls::p_ctinfo = 3220;
//; $tls::andreas = -9476;
//; $tls::pandreas = 3224;
//; $tls::wq = -9472;
//; $tls::pwq = 3228;
//; $tls::sig = -9444;
//; $tls::psig = 3256;
//; $tls::incyg = -9440;
//; $tls::pincyg = 3260;
//; $tls::spinning = -9436;
//; $tls::pspinning = 3264;
//; $tls::stacklock = -9432;
//; $tls::pstacklock = 3268;
//; $tls::stackptr = -9428;
//; $tls::pstackptr = 3272;
//; $tls::stack = -9424;
//; $tls::pstack = 3276;
//; $tls::initialized = -8400;
//; $tls::pinitialized = 4300;
//; __DATA__
#define tls_locals (-12700)
#define tls_plocals (0)
#define tls_local_clib (-11300)
#define tls_plocal_clib (1400)
#define tls___dontuse (-11300)
#define tls_p__dontuse (1400)
#define tls_func (-10212)
#define tls_pfunc (2488)
#define tls_saved_errno (-10208)
#define tls_psaved_errno (2492)
#define tls_sa_flags (-10204)
#define tls_psa_flags (2496)
#define tls_oldmask (-10200)
#define tls_poldmask (2500)
#define tls_deltamask (-10196)
#define tls_pdeltamask (2504)
#define tls_errno_addr (-10192)
#define tls_perrno_addr (2508)
#define tls_sigmask (-10188)
#define tls_psigmask (2512)
#define tls_sigwait_mask (-10184)
#define tls_psigwait_mask (2516)
#define tls_sigwait_info (-10180)
#define tls_psigwait_info (2520)
#define tls_signal_arrived (-10176)
#define tls_psignal_arrived (2524)
#define tls_will_wait_for_signal (-10172)
#define tls_pwill_wait_for_signal (2528)
#define tls_thread_context (-10168)
#define tls_pthread_context (2532)
#define tls_thread_id (-9956)
#define tls_pthread_id (2744)
#define tls_infodata (-9952)
#define tls_pinfodata (2748)
#define tls_tid (-9804)
#define tls_ptid (2896)
#define tls__ctinfo (-9800)
#define tls_p_ctinfo (2900)
#define tls_andreas (-9796)
#define tls_pandreas (2904)
#define tls_wq (-9792)
#define tls_pwq (2908)
#define tls_sig (-9764)
#define tls_psig (2936)
#define tls_incyg (-9760)
#define tls_pincyg (2940)
#define tls_spinning (-9756)
#define tls_pspinning (2944)
#define tls_stacklock (-9752)
#define tls_pstacklock (2948)
#define tls_stackptr (-9748)
#define tls_pstackptr (2952)
#define tls_stack (-9744)
#define tls_pstack (2956)
#define tls_initialized (-8720)
#define tls_pinitialized (3980)
#define tls_local_clib (-10980)
#define tls_plocal_clib (1720)
#define tls___dontuse (-10980)
#define tls_p__dontuse (1720)
#define tls_func (-9892)
#define tls_pfunc (2808)
#define tls_saved_errno (-9888)
#define tls_psaved_errno (2812)
#define tls_sa_flags (-9884)
#define tls_psa_flags (2816)
#define tls_oldmask (-9880)
#define tls_poldmask (2820)
#define tls_deltamask (-9876)
#define tls_pdeltamask (2824)
#define tls_errno_addr (-9872)
#define tls_perrno_addr (2828)
#define tls_sigmask (-9868)
#define tls_psigmask (2832)
#define tls_sigwait_mask (-9864)
#define tls_psigwait_mask (2836)
#define tls_sigwait_info (-9860)
#define tls_psigwait_info (2840)
#define tls_signal_arrived (-9856)
#define tls_psignal_arrived (2844)
#define tls_will_wait_for_signal (-9852)
#define tls_pwill_wait_for_signal (2848)
#define tls_thread_context (-9848)
#define tls_pthread_context (2852)
#define tls_thread_id (-9636)
#define tls_pthread_id (3064)
#define tls_infodata (-9632)
#define tls_pinfodata (3068)
#define tls_tid (-9484)
#define tls_ptid (3216)
#define tls__ctinfo (-9480)
#define tls_p_ctinfo (3220)
#define tls_andreas (-9476)
#define tls_pandreas (3224)
#define tls_wq (-9472)
#define tls_pwq (3228)
#define tls_sig (-9444)
#define tls_psig (3256)
#define tls_incyg (-9440)
#define tls_pincyg (3260)
#define tls_spinning (-9436)
#define tls_pspinning (3264)
#define tls_stacklock (-9432)
#define tls_pstacklock (3268)
#define tls_stackptr (-9428)
#define tls_pstackptr (3272)
#define tls_stack (-9424)
#define tls_pstack (3276)
#define tls_initialized (-8400)
#define tls_pinitialized (4300)

View File

@ -3,115 +3,115 @@
//; $tls::start_offset = -12800;
//; $tls::locals = -12800;
//; $tls::plocals = 0;
//; $tls::local_clib = -11264;
//; $tls::plocal_clib = 1536;
//; $tls::__dontuse = -11264;
//; $tls::p__dontuse = 1536;
//; $tls::func = -9376;
//; $tls::pfunc = 3424;
//; $tls::saved_errno = -9368;
//; $tls::psaved_errno = 3432;
//; $tls::sa_flags = -9364;
//; $tls::psa_flags = 3436;
//; $tls::oldmask = -9360;
//; $tls::poldmask = 3440;
//; $tls::deltamask = -9352;
//; $tls::pdeltamask = 3448;
//; $tls::errno_addr = -9344;
//; $tls::perrno_addr = 3456;
//; $tls::sigmask = -9336;
//; $tls::psigmask = 3464;
//; $tls::sigwait_mask = -9328;
//; $tls::psigwait_mask = 3472;
//; $tls::sigwait_info = -9320;
//; $tls::psigwait_info = 3480;
//; $tls::signal_arrived = -9312;
//; $tls::psignal_arrived = 3488;
//; $tls::will_wait_for_signal = -9304;
//; $tls::pwill_wait_for_signal = 3496;
//; $tls::thread_context = -9296;
//; $tls::pthread_context = 3504;
//; $tls::thread_id = -8464;
//; $tls::pthread_id = 4336;
//; $tls::infodata = -8460;
//; $tls::pinfodata = 4340;
//; $tls::tid = -8312;
//; $tls::ptid = 4488;
//; $tls::_ctinfo = -8304;
//; $tls::p_ctinfo = 4496;
//; $tls::andreas = -8296;
//; $tls::pandreas = 4504;
//; $tls::wq = -8288;
//; $tls::pwq = 4512;
//; $tls::sig = -8240;
//; $tls::psig = 4560;
//; $tls::incyg = -8236;
//; $tls::pincyg = 4564;
//; $tls::spinning = -8232;
//; $tls::pspinning = 4568;
//; $tls::stacklock = -8228;
//; $tls::pstacklock = 4572;
//; $tls::stackptr = -8224;
//; $tls::pstackptr = 4576;
//; $tls::stack = -8216;
//; $tls::pstack = 4584;
//; $tls::initialized = -6168;
//; $tls::pinitialized = 6632;
//; $tls::local_clib = -10624;
//; $tls::plocal_clib = 2176;
//; $tls::__dontuse = -10624;
//; $tls::p__dontuse = 2176;
//; $tls::func = -8736;
//; $tls::pfunc = 4064;
//; $tls::saved_errno = -8728;
//; $tls::psaved_errno = 4072;
//; $tls::sa_flags = -8724;
//; $tls::psa_flags = 4076;
//; $tls::oldmask = -8720;
//; $tls::poldmask = 4080;
//; $tls::deltamask = -8712;
//; $tls::pdeltamask = 4088;
//; $tls::errno_addr = -8704;
//; $tls::perrno_addr = 4096;
//; $tls::sigmask = -8696;
//; $tls::psigmask = 4104;
//; $tls::sigwait_mask = -8688;
//; $tls::psigwait_mask = 4112;
//; $tls::sigwait_info = -8680;
//; $tls::psigwait_info = 4120;
//; $tls::signal_arrived = -8672;
//; $tls::psignal_arrived = 4128;
//; $tls::will_wait_for_signal = -8664;
//; $tls::pwill_wait_for_signal = 4136;
//; $tls::thread_context = -8656;
//; $tls::pthread_context = 4144;
//; $tls::thread_id = -7824;
//; $tls::pthread_id = 4976;
//; $tls::infodata = -7820;
//; $tls::pinfodata = 4980;
//; $tls::tid = -7672;
//; $tls::ptid = 5128;
//; $tls::_ctinfo = -7664;
//; $tls::p_ctinfo = 5136;
//; $tls::andreas = -7656;
//; $tls::pandreas = 5144;
//; $tls::wq = -7648;
//; $tls::pwq = 5152;
//; $tls::sig = -7600;
//; $tls::psig = 5200;
//; $tls::incyg = -7596;
//; $tls::pincyg = 5204;
//; $tls::spinning = -7592;
//; $tls::pspinning = 5208;
//; $tls::stacklock = -7588;
//; $tls::pstacklock = 5212;
//; $tls::stackptr = -7584;
//; $tls::pstackptr = 5216;
//; $tls::stack = -7576;
//; $tls::pstack = 5224;
//; $tls::initialized = -5528;
//; $tls::pinitialized = 7272;
//; __DATA__
#define tls_locals (-12800)
#define tls_plocals (0)
#define tls_local_clib (-11264)
#define tls_plocal_clib (1536)
#define tls___dontuse (-11264)
#define tls_p__dontuse (1536)
#define tls_func (-9376)
#define tls_pfunc (3424)
#define tls_saved_errno (-9368)
#define tls_psaved_errno (3432)
#define tls_sa_flags (-9364)
#define tls_psa_flags (3436)
#define tls_oldmask (-9360)
#define tls_poldmask (3440)
#define tls_deltamask (-9352)
#define tls_pdeltamask (3448)
#define tls_errno_addr (-9344)
#define tls_perrno_addr (3456)
#define tls_sigmask (-9336)
#define tls_psigmask (3464)
#define tls_sigwait_mask (-9328)
#define tls_psigwait_mask (3472)
#define tls_sigwait_info (-9320)
#define tls_psigwait_info (3480)
#define tls_signal_arrived (-9312)
#define tls_psignal_arrived (3488)
#define tls_will_wait_for_signal (-9304)
#define tls_pwill_wait_for_signal (3496)
#define tls_thread_context (-9296)
#define tls_pthread_context (3504)
#define tls_thread_id (-8464)
#define tls_pthread_id (4336)
#define tls_infodata (-8460)
#define tls_pinfodata (4340)
#define tls_tid (-8312)
#define tls_ptid (4488)
#define tls__ctinfo (-8304)
#define tls_p_ctinfo (4496)
#define tls_andreas (-8296)
#define tls_pandreas (4504)
#define tls_wq (-8288)
#define tls_pwq (4512)
#define tls_sig (-8240)
#define tls_psig (4560)
#define tls_incyg (-8236)
#define tls_pincyg (4564)
#define tls_spinning (-8232)
#define tls_pspinning (4568)
#define tls_stacklock (-8228)
#define tls_pstacklock (4572)
#define tls_stackptr (-8224)
#define tls_pstackptr (4576)
#define tls_stack (-8216)
#define tls_pstack (4584)
#define tls_initialized (-6168)
#define tls_pinitialized (6632)
#define tls_local_clib (-10624)
#define tls_plocal_clib (2176)
#define tls___dontuse (-10624)
#define tls_p__dontuse (2176)
#define tls_func (-8736)
#define tls_pfunc (4064)
#define tls_saved_errno (-8728)
#define tls_psaved_errno (4072)
#define tls_sa_flags (-8724)
#define tls_psa_flags (4076)
#define tls_oldmask (-8720)
#define tls_poldmask (4080)
#define tls_deltamask (-8712)
#define tls_pdeltamask (4088)
#define tls_errno_addr (-8704)
#define tls_perrno_addr (4096)
#define tls_sigmask (-8696)
#define tls_psigmask (4104)
#define tls_sigwait_mask (-8688)
#define tls_psigwait_mask (4112)
#define tls_sigwait_info (-8680)
#define tls_psigwait_info (4120)
#define tls_signal_arrived (-8672)
#define tls_psignal_arrived (4128)
#define tls_will_wait_for_signal (-8664)
#define tls_pwill_wait_for_signal (4136)
#define tls_thread_context (-8656)
#define tls_pthread_context (4144)
#define tls_thread_id (-7824)
#define tls_pthread_id (4976)
#define tls_infodata (-7820)
#define tls_pinfodata (4980)
#define tls_tid (-7672)
#define tls_ptid (5128)
#define tls__ctinfo (-7664)
#define tls_p_ctinfo (5136)
#define tls_andreas (-7656)
#define tls_pandreas (5144)
#define tls_wq (-7648)
#define tls_pwq (5152)
#define tls_sig (-7600)
#define tls_psig (5200)
#define tls_incyg (-7596)
#define tls_pincyg (5204)
#define tls_spinning (-7592)
#define tls_pspinning (5208)
#define tls_stacklock (-7588)
#define tls_pstacklock (5212)
#define tls_stackptr (-7584)
#define tls_pstackptr (5216)
#define tls_stack (-7576)
#define tls_pstack (5224)
#define tls_initialized (-5528)
#define tls_pinitialized (7272)