alloc of table makes it aligned.

git-svn-id: file:///svn/unbound/trunk@102 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-02-15 12:54:14 +00:00
parent a45ca399fe
commit 6f94bd720d
4 changed files with 8 additions and 2 deletions

View File

@ -246,6 +246,11 @@ worker_init(const char* port, int do_ip4, int do_ip6, int do_udp, int do_tcp,
return NULL;
}
/* init random(), large table size. */
if(!(worker->rndstate = (char*)malloc(RND_STATE_SIZE))) {
log_err("malloc rndtable failed.");
worker_delete(worker);
return NULL;
}
if(!initstate(time(NULL)^getpid(), worker->rndstate, RND_STATE_SIZE)) {
log_err("could not init random numbers.");
worker_delete(worker);

View File

@ -78,7 +78,7 @@ struct worker {
socklen_t fwd_addrlen;
/** random() table for this worker. */
char rndstate[RND_STATE_SIZE];
char* rndstate;
};
/**

View File

@ -1,6 +1,7 @@
15 February 2007: Wouter
- port to FreeBSD 4.11 Dec Alpha. Also works on Solaris 10 sparc64,
Solaris 9, FreeBSD 6, Linux i386 and OSX powerpc.
- malloc rndstate, so that it is aligned for access.
14 February 2007: Wouter
- Included configure.ac changes from ldns.

View File

@ -1,4 +1,4 @@
SCENARIO_BEGIN Forwarder and a timeout happens on server query.
SCENARIO_BEGIN Forwarder and an error happens on server query.
STEP 1 QUERY
ENTRY_BEGIN
SECTION QUESTION