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
Build has strict-aliasing violations #8
Comments
Hey Eli ...What OS and is this on and are these default compiler settings or are you working within a CI/CD pipeline ???Its this compiler switch that is generating the error ...-Werror=strict-aliasingIf you use argus-5.0, does it compile cleanly ???CarterOn Feb 28, 2024, at 7:59 PM, Eli Schwartz ***@***.***> wrote:
make[1]: Entering directory '/var/tmp/portage/net-analyzer/argus-3.0.8.3-r2/work/argus-3.0.8.3/argus'
make[1]: warning: -j8 forced in submake: resetting jobserver mode.
x86_64-pc-linux-gnu-gcc -march=native -fstack-protector-all -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-clash-protection -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wl,-O1 -Wl,--as-needed -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wl,--defsym=__gentoo_check_ldflags__=0 -I. -I/usr/include -I./../include -DHAVE_CONFIG_H -c ArgusModeler.c
ArgusModeler.c: In function ‘ArgusGenerateRecord’:
ArgusModeler.c:3311:103: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
3311 | ((unsigned int *)(dsr + 1))[0] = (((unsigned int *)&metric->dst.pkts)[0]);
| ^
ArgusModeler.c:3313:104: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
3313 | ((unsigned int *)(dsr + 1))[2] = (((unsigned int *)&metric->dst.bytes)[0]);
| ^
cc1: some warnings being treated as errors
make[1]: *** [Makefile:74: ArgusModeler.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-analyzer/argus-3.0.8.3-r2/work/argus-3.0.8.3/argus'
Full build log: build.log
Downstream report: https://bugs.gentoo.org/861146
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Hi, I am running Gentoo Linux and I tried compiling this package: https://packages.gentoo.org/packages/net-analyzer/argus Gentoo only packages argus 3.0.8.3, although there's a notice that 3.0.8.4 is available and could be updated to. I don't see an argus 5 anywhere, and this GitHub repository doesn't have any git tags, let alone a version 5 tag. So I am not sure how to try "argus-5.0". I'm not working in a CI/CD pipeline. I compile all my software with I wish it was a default compiler setting... |
https://github.com/openargus/argus-5.0 ?? Carter Bullard • CEO250 E 53rd Street Suite 501New York, New York 10022Phone +1.212.588.9133 • Mobile +1.917.497.9494On Feb 29, 2024, at 11:34 AM, Eli Schwartz ***@***.***> wrote:
Hi,
I am running Gentoo Linux and I tried compiling this package: https://packages.gentoo.org/packages/net-analyzer/argus
Gentoo only packages argus 3.0.8.3, although there's a notice that 3.0.8.4 is available and could be updated to. I don't see an argus 5 anywhere, and this GitHub repository doesn't have any git tags, let alone a version 5 tag.
So I am not sure how to try "argus-5.0".
I'm not working in a CI/CD pipeline. I compile all my software with -Werror=strict-aliasing because violations of the C standard's requirements for aliasing is UB and modern compilers will attempt to optimize by assuming UB cannot happen, and as a result will miscompile code that hss strict-aliasing issues and produce segfaults, general misbehavior, or possibly even the dreaded nasal demons. ;)
I wish it was a default compiler setting...
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
I really wish people wouldn't do that... The purpose of version control is to have, well, versions. Hiding different versions of the code elsewhere is just confusing. Argus 5 isn't mentioned at https://openargus.org/getting-argus and isn't visible from the "argus" repo. It doesn't contain the same fixes, for example #5 doesn't appear to be present. It doesn't appear to have an official release. It is not clear that it is meant to be used, though perhaps if it was meant to be used it would be publicized. On the flip side, this "argus 5" repository that isn't released does have openargus/argus-5.0@08a3e40 which seems... important. And it should probably be included in "argus" too. (Why is it from 2018, but has never made it to a regular argus release?) |
Eli ... get on the mailing list and you'll know why ... Carter Carter Bullard • CEO250 E 53rd Street Suite 501New York, New York 10022Phone +1.212.588.9133 • Mobile +1.917.497.9494On Feb 29, 2024, at 3:15 PM, Eli Schwartz ***@***.***> wrote:
I really wish people wouldn't do that...
The purpose of version control is to have, well, versions. Hiding different versions of the code elsewhere is just confusing.
Argus 5 isn't mentioned at https://openargus.org/getting-argus and isn't visible from the "argus" repo. It doesn't contain the same fixes, for example #5 doesn't appear to be present. It doesn't appear to have an official release. It is not clear that it is meant to be used, though perhaps if it was meant to be used it would be publicized.
On the flip side, this "argus 5" repository that isn't released does have ***@***.*** which seems... important. And it should probably be included in "argus" too.
(Why is it from 2018, but has never made it to a regular argus release?)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Well apparently the mailing list doesn't even allow non-members to read-only view the contents, which is a bit exasperating since otherwise I would have already looked. |
Hey Eli ... well argus has been around for a while and the mailing list is the best way to communicate wirth the group ... Seems that that channel isn't working for you so ... yes ... argus-5.0 is in testing and any new changes will go into argus-5.0 not 3.x ... 5.0 is a major version upgrade and 3.x is not compatible, so we're gently introducing it ... should be official by June ... 5.0 clients are backward compatible so if you do have a bunch of 3.0 data, you can read it 5.0 programs.5.0 is a reduced code set of commercial argus (thus 5.0) so there is a little testing that is needed. You should go all in on 5.0 (server and clients) if you haven't used argus much before and get the code from github. All docs will be changed by June, when we merge it into the argus repo with tags.Argus-5.0 may not have your issue, so if you grab it and it compiles, great !! If not I'll fix it !!Carter Carter Bullard • CEO250 E 53rd Street Suite 501New York, New York 10022Phone +1.212.588.9133 • Mobile +1.917.497.9494On Feb 29, 2024, at 4:54 PM, Eli Schwartz ***@***.***> wrote:
Well apparently the mailing list doesn't even allow non-members to read-only view the contents, which is a bit exasperating since otherwise I would have already looked.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Hey Eli,
I did test all your compiler -W options in argus-5.0 and didn’t get any errors, warnings, comments or opinions from gcc …
Gentoo wasn’t on our list of OS’s for the first pass, but if you have any time test the argus-5.0 repo on your system, that would be really helpful.
Thanks !!!!
Carter
… On Feb 28, 2024, at 7:59 PM, Eli Schwartz ***@***.***> wrote:
make[1]: Entering directory '/var/tmp/portage/net-analyzer/argus-3.0.8.3-r2/work/argus-3.0.8.3/argus'
make[1]: warning: -j8 forced in submake: resetting jobserver mode.
x86_64-pc-linux-gnu-gcc -march=native -fstack-protector-all -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-clash-protection -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wl,-O1 -Wl,--as-needed -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wl,--defsym=__gentoo_check_ldflags__=0 -I. -I/usr/include -I./../include -DHAVE_CONFIG_H -c ArgusModeler.c
ArgusModeler.c: In function ‘ArgusGenerateRecord’:
ArgusModeler.c:3311:103: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
3311 | ((unsigned int *)(dsr + 1))[0] = (((unsigned int *)&metric->dst.pkts)[0]);
| ^
ArgusModeler.c:3313:104: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
3313 | ((unsigned int *)(dsr + 1))[2] = (((unsigned int *)&metric->dst.bytes)[0]);
| ^
cc1: some warnings being treated as errors
make[1]: *** [Makefile:74: ArgusModeler.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-analyzer/argus-3.0.8.3-r2/work/argus-3.0.8.3/argus'
Full build log: build.log <https://github.com/openargus/argus/files/14441456/build.log>
Downstream report: https://bugs.gentoo.org/861146
—
Reply to this email directly, view it on GitHub <#8>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB3MTCC6OVPXZTUMVH3XCLLYV7HH3AVCNFSM6AAAAABD7AZ6AWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3DAMJUGMYDEMY>.
You are receiving this because you are subscribed to this thread.
|
Merge pull request #8 from openargus/main
The branch v5.0.0 should satisfy all of Eli's issues regarding compiler warnings and errors ... If not, lets start another issue |
Full build log: build.log
Downstream report: https://bugs.gentoo.org/861146
The text was updated successfully, but these errors were encountered: