* The following bugs are resolved with this release:
- 15347, 15804, 15894, 16284, 16447, 16532, 16545, 16574, 16600, 16609,
- 16610, 16611, 16613, 16623, 16632, 16639, 16642, 16649, 16670, 16674,
- 16677, 16680, 16683, 16689, 16695, 16701, 16706, 16707, 16731.
+ 15347, 15804, 15894, 16002, 16284, 16447, 16532, 16545, 16574, 16600,
+ 16609, 16610, 16611, 16613, 16623, 16632, 16639, 16642, 16649, 16670,
+ 16674, 16677, 16680, 16683, 16689, 16695, 16701, 16706, 16707, 16731.
* Running the testsuite no longer terminates as soon as a test fails.
Instead, a file tests.sum (xtests.sum from "make xcheck") is generated,
#endif
bool use_malloc = false;
char *buf;
+ size_t alloca_used = 0;
if (__libc_use_alloca (buf_size))
- buf = alloca (buf_size);
+ buf = alloca_account (buf_size, alloca_used);
else
{
buf = malloc (buf_size);
{
struct in6addrinfo info;
struct in6ailist *next;
+ bool use_malloc;
} *in6ailist = NULL;
size_t in6ailistlen = 0;
bool seen_ipv4 = false;
}
}
- struct in6ailist *newp = alloca (sizeof (*newp));
+ struct in6ailist *newp;
+ if (__libc_use_alloca (alloca_used + sizeof (*newp)))
+ {
+ newp = alloca_account (sizeof (*newp), alloca_used);
+ newp->use_malloc = false;
+ }
+ else
+ {
+ newp = malloc (sizeof (*newp));
+ if (newp == NULL)
+ goto out_fail;
+ newp->use_malloc = true;
+ }
newp->info.flags = (((ifam->ifa_flags
& (IFA_F_DEPRECATED
| IFA_F_OPTIMISTIC))
do
{
result->in6ai[--in6ailistlen] = in6ailist->info;
- in6ailist = in6ailist->next;
+ struct in6ailist *next = in6ailist->next;
+ if (in6ailist->use_malloc)
+ free (in6ailist);
+ in6ailist = next;
}
while (in6ailist != NULL);
}
free (buf);
return result;
-out_fail:
+ out_fail:
+ while (in6ailist != NULL)
+ {
+ struct in6ailist *next = in6ailist->next;
+ if (in6ailist->use_malloc)
+ free (in6ailist);
+ in6ailist = next;
+ }
if (use_malloc)
free (buf);
return NULL;