Brotli decompressor doesn't work on Visual C++ 2017 compiled with full optimizations #238

Open
opened 2026-01-29 20:40:30 +00:00 by claunia · 0 comments
Owner

Originally created by @jhudsoncedaron on GitHub (Jun 15, 2018).

I extracted the decoder (by copying whole files), wrapped the stuff into a .dll, and built it with Visual C++ 2017 targeting x64. The decoder doesn't copy anything into its output file if the .dll is compiled with full optimization, but works just fine if I disable optimization.

I don't even know how to begin tracking this down. It could easily be a bug in brotli (which I would be much more certain of if this were gcc) or in Visual Studio. I could bisect which compiler optimization option causes this but I really don't think that's going to help.

Current git hash of brotli is 09cd3e877f

Originally created by @jhudsoncedaron on GitHub (Jun 15, 2018). I extracted the decoder (by copying whole files), wrapped the stuff into a .dll, and built it with Visual C++ 2017 targeting x64. The decoder doesn't copy anything into its output file if the .dll is compiled with full optimization, but works just fine if I disable optimization. I don't even know how to begin tracking this down. It could easily be a bug in brotli (which I would be much more certain of if this were gcc) or in Visual Studio. I could bisect which compiler optimization option causes this but I really don't think that's going to help. Current git hash of brotli is 09cd3e877f583e6352be146ab22415298366c8d6
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#238