)]}'
{"src/erasurecode.c":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"701e9a1ea558d818d2a6ecfbc9b17cede41c854b","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"            uint32_t stored_chksum \u003d fragment_hdr-\u003emeta.chksum[0];"},{"line_number":1065,"context_line":"            char *fragment_data \u003d get_data_ptr_from_fragment(fragment);"},{"line_number":1066,"context_line":"            uint64_t fragment_size \u003d fragment_hdr-\u003emeta.size;"},{"line_number":1067,"context_line":"            computed_chksum \u003d crc32(0, (unsigned char *) fragment_data, fragment_size);"},{"line_number":1068,"context_line":"            if (stored_chksum !\u003d computed_chksum) {"},{"line_number":1069,"context_line":"                // Try again with our \"alternative\" crc32; see"},{"line_number":1070,"context_line":"                // https://bugs.launchpad.net/liberasurecode/+bug/1666320"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"3f1d235d_560c9e92","line":1067,"updated":"2017-07-13 10:04:41.000000000","message":"OK, crc32 takes Bytef* for the second arg[1] and Bytef is actually unsigned char[2].\nI had concerned about the cast from signed char to unsigned char for the value but it seems safe only one-way cast from singed to unsigned.\n1: https://www.zlib.net/manual.html\n2: http://refspecs.linuxbase.org/LSB_2.0.1/LSB-PDA/LSB-PDA/libz-ddefs.html","commit_id":"a9b20ae6a38073afe91ae2b7d789ddfb7dabade8"}],"src/utils/chksum/crc32.c":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"05268c6fec85ede17ebf90064493b98ea46cb3b8","unresolved":false,"context_lines":[{"line_number":113,"context_line":"};"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"// Use same polynomial as Intel\u0027s SSE4 instruction!"},{"line_number":116,"context_line":"#define POLY_CRC_32 0x11EDC6F41"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"int"},{"line_number":119,"context_line":"crc32(int crc, const void *buf, size_t size)"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"5f201791_812aeb7b","side":"PARENT","line":116,"updated":"2017-06-28 18:42:37.000000000","message":"the zlib\u0027s source seems to imply that the default is x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1, or -- if my calculations are correct! -- 0x104c11db7. Which is a bit strange, I thought that about every CRC32 in the world used the same poly as specified by ITU for the old X.something protocols. Of course there\u0027s no telling if the constant in our code was properly used to generate the table crc32_tab[].","commit_id":"7c4ef60c9d9e69dd23e43ec59d6c03e139a32723"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"584e46bffdf2e42cd22dc2eedea173da1ff3a35b","unresolved":false,"context_lines":[{"line_number":113,"context_line":"};"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"// Use same polynomial as Intel\u0027s SSE4 instruction!"},{"line_number":116,"context_line":"#define POLY_CRC_32 0x11EDC6F41"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"int"},{"line_number":119,"context_line":"crc32(int crc, const void *buf, size_t size)"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"3f1d235d_af52b739","side":"PARENT","line":116,"in_reply_to":"5f201791_812aeb7b","updated":"2017-07-05 19:58:25.000000000","message":"Judging by https://github.com/madler/zlib/blob/v1.2.11/crc32.h#L8-L59 the constant here *was not* used to generate the table; rather, the table matches the zlib\u0027s implementation (which you correctly identified as (1)04c11db7) with one significant exception: we\u0027re using signed ints instead of unsigned longs.\n\nAs far as I can tell, this #define is never used anywhere.\n\n(As an aside, I found the table at https://en.wikipedia.org/wiki/Cyclic_redundancy_check#Standards_and_common_use useful while investigating the different types of CRCs.)","commit_id":"7c4ef60c9d9e69dd23e43ec59d6c03e139a32723"}],"test/liberasurecode_test.c":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"701e9a1ea558d818d2a6ecfbc9b17cede41c854b","unresolved":false,"context_lines":[{"line_number":1754,"context_line":"        \"\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\""},{"line_number":1755,"context_line":"        \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\""},{"line_number":1756,"context_line":"        \"\\x00\\x00\\x00\\x00\\x00\\x00\\x07\\x01\\x0e\\x02\\x00\\xcc\\x5e\\x0c\\x0b\\x00\""},{"line_number":1757,"context_line":"        \"\\x04\\x01\\x00\\x22\\xee\\x45\\xb9\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\";"},{"line_number":1758,"context_line":""},{"line_number":1759,"context_line":"    fragment_metadata_t res;"},{"line_number":1760,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"1f1a1f67_29574b05","line":1757,"updated":"2017-07-13 10:04:41.000000000","message":"To be honest, I could not know if this binary and the following header modification is correct or not. Perhaps, adding summary (e.g. backend info, version, magic, etc...) could help us to know how this was generated.\n\nFWIW, I did test the code correctness with [1] that asserts 2 types of crc32 located in encoded fragments simply.\n\n1: https://gist.github.com/bloodeagle40234/b9118208974cba2ac7c4fbe700c2f46f","commit_id":"a9b20ae6a38073afe91ae2b7d789ddfb7dabade8"}]}
