kohler / masstree-beta

Beta release of Masstree.
Other
430 stars 115 forks source link

Bug? about controling key whose length is 9 #42

Open thawk105 opened 4 years ago

thawk105 commented 4 years ago

I may found bugs. Could you read this comment?

https://github.com/kohler/masstree-beta/blob/4f4bc583217e8aaf88e1d3c351fdfe4c948e9a42/configure.ac#L446 This line defines HAVE_UNALIGNED_ACCESS to 1.

Then, comparing method is forced this line. https://github.com/kohler/masstree-beta/blob/cef4cc4f68953bdc4d0aec736cb8e1ce0700a4ae/string_slice.hh#L151

I think there is a problem. If we use the key whose length is 9, or 17, or..., which isn't divisible by 8, it causes segv.

Is this right? Sincerely yours, Takayuki