eris: remove makeseed to increase determinism.
This commit is contained in:
@@ -82,20 +82,9 @@ typedef struct LG {
|
|||||||
** Address Space Layout Randomization (if present) to increase
|
** Address Space Layout Randomization (if present) to increase
|
||||||
** randomness..
|
** randomness..
|
||||||
*/
|
*/
|
||||||
#define addbuff(b,p,e) \
|
|
||||||
{ size_t t = cast(size_t, e); \
|
|
||||||
memcpy(buff + p, &t, sizeof(t)); p += sizeof(t); }
|
|
||||||
|
|
||||||
static unsigned int makeseed (lua_State *L) {
|
static unsigned int makeseed (lua_State *L) {
|
||||||
char buff[4 * sizeof(size_t)];
|
return 1234;
|
||||||
unsigned int h = luai_makeseed();
|
|
||||||
int p = 0;
|
|
||||||
addbuff(buff, p, L); /* heap variable */
|
|
||||||
addbuff(buff, p, &h); /* local variable */
|
|
||||||
addbuff(buff, p, luaO_nilobject); /* global variable */
|
|
||||||
addbuff(buff, p, &lua_newstate); /* public function */
|
|
||||||
lua_assert(p == sizeof(buff));
|
|
||||||
return luaS_hash(buff, p, h);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user