New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gen_binary_files
adds non-determinism to pinyin_index.bin
#162
Comments
Do you know some good tools for binary compare? Thanks! |
I use filterdiff as |
I think libpinyin uses Kyoto Cabinet now. I guess the difference between pinyin_index.bin and phrase_index.bin is that:
BTW, does Kyoto Cabinet support reproducible builds? |
That 2-byte-alignment could cause an added 2 bytes of padding that remain uninitialized. |
Maybe the code is in the ChewingLargeTable2::add_index_internal method of the chewing_large_table2_kyotodb.cpp file. |
While working on reproducible builds for openSUSE, I found that our
libpinyin
package hada
pinyin_index.bin
andaddon_pinyin_index.bin
that vary for every build, unless ASLR is disabled.Steps to reproduce:
Actual result:
produces different results with roughly 16 bits of randomness.
Expected result:
output should be fully deterministic.
Here are two sets of samples:
https://rb.zq1.de/temp/pinyin_index.tar.xz
The text was updated successfully, but these errors were encountered: