summaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-10-12 10:02:37 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-10-12 12:29:09 -0300
commit9a89fb1c9dfeda4640780111f9e9437f08cfad88 (patch)
tree63b47c65d3881929d45fe63156816157356920a6 /ltests.c
parentc23cc86c542449db47bdb21e9550203309bef045 (diff)
downloadlua-github-9a89fb1c9dfeda4640780111f9e9437f08cfad88.tar.gz
Hash always use all characters in a long string
Hashes for long strings are computed only when they are used as keys in a table, not a too common case. And, in that case, it is to easy to force collisions changing only the characters which are not part of the hash.
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/ltests.c b/ltests.c
index 99456159..7e3a389a 100644
--- a/ltests.c
+++ b/ltests.c
@@ -523,7 +523,6 @@ static lu_mem checkgraylist (global_State *g, GCObject *o) {
((void)g); /* better to keep it available if we need to print an object */
while (o) {
lua_assert(!!isgray(o) ^ (getage(o) == G_TOUCHED2));
- //lua_assert(isgray(o) || getage(o) == G_TOUCHED2);
lua_assert(!testbit(o->marked, TESTBIT));
if (keepinvariant(g))
l_setbit(o->marked, TESTBIT); /* mark that object is in a gray list */