mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
BROTLI_BUILD_PORTABLE has dangerous default setting #89
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ncopa on GitHub (Jan 28, 2016).
firefox 44.0 recently shipped with brotli support. On Alpine Linux (which uses musl libc) it crashed due to it was not built with BROTLI_BUILD_PORTABLE set. (or BROTLI_SAFE_MEMMOVE to be sepcific)
There was no warning and there was no way to catch it til after the fact that it had happened. (it wouldn't been caught if we wouldn't build with FORTIFY_SOURCE).
I would recommend that you flip the default setting around and by default build with
BROTLI_BUILD_PORTABLEor change it toBROTLI_BUILD_NONPORTABLE, because the memcpy implementation is outside of your control, you can not verify or warn if things gets miscompiled and relying on "undefined behavior" is generally a bad idea.