]> Cypherpunks repositories - gostls13.git/commit
compress/flate: add optional runtime sanity checks
authorMatthew Dempsky <mdempsky@google.com>
Wed, 15 Apr 2015 23:46:58 +0000 (16:46 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 16 Apr 2015 04:16:30 +0000 (04:16 +0000)
commit69d9247705f0e9c7e4e6f11ab731ee6870291455
tree26e6a7cc422acbc3c5c8f1128d74542c5e345f13
parent5f0ac4a456e8be27562262ebb52cfb137dd48844
compress/flate: add optional runtime sanity checks

This code's test coverage is ad hoc at best, and it's easy to make
changes that accidentally regress invariants.  This CL adds a "sanity"
constant that can be changed to "true" during development to add extra
runtime checking that the Huffman decoder tables are sane.

Change-Id: I0d0ca53ad7c9566be18046d9b255e1a30059f28b
Reviewed-on: https://go-review.googlesource.com/8974
Reviewed-by: Nigel Tao <nigeltao@golang.org>
src/compress/flate/inflate.go