New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gcc12 build error #1767
Comments
So the compiler seems to do stupid things again, by considering that a loop going from 0 to 1 (excluded) and reading an array of size 1 is writing an array of size zero!!! The apparently offending code is:
I mean, And as this report made me doubt, I did this to double-check that the array was properly sized:
And it doesn't trigger, so there's not even any doubt at any place where this file is loaded. In fact, it looks so stupidly simple that I have no idea how to modify this to please gcc here! |
in theory we can add |
I can try to bisect on gcc |
I'm almost done with gcc bisecting (my low end laptop takes 8-9 hours for each gcc build, one hash left to verify). @wtarreau , I will open gcc bug and I count on you to help there with details. |
It's very possible that you will end up on an issue that was already reported one way or another, especially for something that gross, so it's important to look in their issue tracker first and plug onto an existing one with your bisect info once you find one. It may help them figure the impacts of certain choices and see how to refine some such warning options so that they actually emit relevant stuff. Thanks and good luck :-) |
my kungfu in searching issues in gcc bugzilla is not as strong as bisecting. from current situation, breaking change was introduced in november 2021, it is still reproduced on master branch, I'm afraid we'll be first reporters. |
looks like breaking change introduced in http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=88b504b7a8c5affb0ffa97990d22af2b199e36ed I'm double checking... |
reported to gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106297 |
Thank you Ilya. |
the issue is acknowledged on gcc side |
Thank you Ilya. I had tried on my side to create a smaller and simpler reproducer but I failed, so I think that a bit of complexity is needed to confuse the compiler. In the event I would manage to create a 20-line reproducer, I'd update the bugzilla entry. |
btw, gcc12 build is green again https://gitlab.com/chipitsine/haproxy-ci-playground/-/jobs/2757118359 surprisingly, I did not expect that before gcc bug is fixed |
Tool Name and Version
gcc12
Code Report
Additional Information
No response
Output of
haproxy -vv
The text was updated successfully, but these errors were encountered: