1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-26 13:21:07 +03:00
2003-03-08  Ulrich Drepper  <drepper@redhat.com>

	* allocatestack.c (allocate_stack): If mprotect() fails free the
	TLS memory.
This commit is contained in:
Ulrich Drepper
2003-03-08 09:41:16 +00:00
parent 35457070d2
commit d130a34156
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2003-03-08 Ulrich Drepper <drepper@redhat.com>
* allocatestack.c (allocate_stack): If mprotect() fails free the
TLS memory.
2003-03-07 Ulrich Drepper <drepper@redhat.com> 2003-03-07 Ulrich Drepper <drepper@redhat.com>
* sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions. * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.

View File

@ -439,9 +439,12 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
lll_unlock (stack_cache_lock); lll_unlock (stack_cache_lock);
/* Free the memory regardless of whether the size of the /* Get rid of the TLS block we allocated. */
cache is over the limit or not. If this piece of _dl_deallocate_tls (pd, false);
memory caused problems we better do not use it
/* Free the stack memory regardless of whether the size
of the cache is over the limit or not. If this piece
of memory caused problems we better do not use it
anymore. Uh, and we ignore possible errors. There anymore. Uh, and we ignore possible errors. There
is nothing we could do. */ is nothing we could do. */
(void) munmap (mem, size); (void) munmap (mem, size);