这情况真TM无语。
最后通过搜索发现是inffast.c 这个文件的问题。
/* inffast.c -- fast decoding
* Copyright (C) 1995-2017 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#include "zutil.h"
#include "inftrees.h"
#include "inflate.h"
#include "inffast.h"
#ifdef ASMINF
# pragma message("Assembler code may have bugs -- use at your own risk")
#else
因为release版解压缩启用了汇编代码,而debug版没有。所以才会出现这个问题。
解决办法:
去掉后边两个预编译选项。