linux icon indicating copy to clipboard operation
linux copied to clipboard

Kernel's inflate code may not work properly with -O3

Open VVIsaev opened this issue 3 years ago • 0 comments

There is an alignment issue with inflate code which causes some tricky problems, such as corrupted files or binaries. Other arches don't see this because we are the only one which uses -O3 for building kernel.

There is a workaround for the issue in the arc64 branch: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/blob/bc5fec251f1087dc999fa744aa64799fc02a5476/lib/zlib_inflate/Makefile#L22

Original problem: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/372 GNU GCC issue (resolved invalid): https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100363 lkml thread: https://lkml.org/lkml/2021/4/30/864

Need to fix this in upstream as well.

VVIsaev avatar Jan 27 '22 14:01 VVIsaev