yandex / pire

Perl Incompatible Regular Expressions library
http://github.com/dprokoptsev/pire/wiki
Other
330 stars 30 forks source link

Stable serialization of Scanner #76

Closed jakovenko-dm closed 4 years ago

jakovenko-dm commented 4 years ago

Compiler adds padding bytes to Scanner::Locals structure. Since values of these bytes may differ from time to time, this makes impossible to compare hashes of serialized regexs, etc. Memsetting all bytes to zero at the beginning of structure initialization solves the problem.