Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Fix crash with --prefix#100

Open
MrKrzYch00 wants to merge 1 commit intogoogle:masterfrom
MrKrzYch00:patch-3
Open

Fix crash with --prefix#100
MrKrzYch00 wants to merge 1 commit intogoogle:masterfrom
MrKrzYch00:patch-3

Conversation

@MrKrzYch00
Copy link
Contributor

Occurs most likely when certain g++ optimizations are enabled, so this
code needs to be split into parts to make sure we don't run into
false-positive Issue reports when some user tries out some compiler
optimizations.

Occurs most likely when certain g++ optimizations are enabled, so this
code needs to be split into parts to make sure we don't run into
false-positive Issue reports when some user tries out some compiler
optimizations.
@lvandeve
Copy link
Contributor

What compiler optimizations are this? Maybe there is a deeper issue and reordering the strings like this just appears to fix it. I think if a compiler wrongly optimizes adding C++ strings this way, it should be a compiler bug :)

@MrKrzYch00
Copy link
Contributor Author

Haha, I have put so many switches on my fork I'm quite unsure which one it was (or maybe some main -O flag). But You know, it occured in GCC 4.8, as well is still occurring in GCC 5.3 (maybe it is a bug in windows mingw only? - unfortunately I lost old commit notes on this due to recreating fork long time ago).

@MrKrzYch00
Copy link
Contributor Author

Ah sorry, here it is:

"GCC 4.8.5 workaround for x64 windows compilations" - this was my old commit: MrKrzYch00@756aa47

So it seems to be related to compiling x64 version of zopflipng on windows (maybe it was with an additional AVX tuning). GCC for windows is often quite broken, for example x86 crashes with -fipa-cp-clone or -fprofile-generate with pthreads on EncodeTree when march or mcpu is passed. And they are fixing it and breaking with each release. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants