From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4B523385DC0B; Fri, 17 Apr 2020 19:31:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4B523385DC0B From: "me at serhei dot io" To: systemtap@sourceware.org Subject: [Bug translator/25845] New: buildrun: type-conversion warnings 32-bit with recent gcc Date: Fri, 17 Apr 2020 19:31:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: translator X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: me at serhei dot io X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2020 19:31:16 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25845 Bug ID: 25845 Summary: buildrun: type-conversion warnings 32-bit with recent gcc Product: systemtap Version: unspecified Status: NEW Severity: normal Priority: P2 Component: translator Assignee: systemtap at sourceware dot org Reporter: me at serhei dot io Target Milestone: --- Recent GCC (seen on 9.3.1) complain when compiling stap modules for 32-bit systems. The behaviour that's now being flagged is well-known, unobjectiona= ble and fairly difficult to get rid of -- it's based on the fact that stap scal= ar values are always 64-bit words regardless of the type being store in them. = Most likely, we should suppress the warnings in question, but I'm filing a PR to keep track of the decision in case there are any surprises. Example: as_root /notnfs/smakarov/stap-checkout/stap_install/bin/stap --rlimit-as=3D1 --rlimit-as=3D99999999999\ 9 -wp4 /notnfs/smakarov/stap-checkout/testsuite/systemtap.base/rlimit.stp OUT /tmp/stapwwHXqw/stap_2fcc2a5ab281c9226223b81a92db655d_2051647_src.c: In function 'function___g\ lobal___get_kregs__overload_0': /tmp/stapwwHXqw/stap_2fcc2a5ab281c9226223b81a92db655d_2051647_src.c:328917:= 33: error: cast from po\ inter to integer of different size [-Werror=3Dpointer-to-int-cast] 328917 | /* guru */ STAP_RETVALUE =3D (int64_t)CONTEXT->kregs; | ^ /tmp/stapwwHXqw/stap_2fcc2a5ab281c9226223b81a92db655d_2051647_src.c: In function 'function___globa\ l___set_kregs__overload_0': /tmp/stapwwHXqw/stap_2fcc2a5ab281c9226223b81a92db655d_2051647_src.c:328956:= 34: error: cast to poin\ ter from integer of different size [-Werror=3Dint-to-pointer-cast] 328956 | /* guru */ CONTEXT->kregs =3D (struct pt_regs*)STAP_ARG_regs; | ^ /tmp/stapwwHXqw/stap_2fcc2a5ab281c9226223b81a92db655d_2051647_src.c: In function 'function___priva\ te__notnfs_smakarov_stap_checkout_testsuite_systemtap_base_rlimit_stp__dwar= f_tvar_get_new_rev_269': /tmp/stapwwHXqw/stap_2fcc2a5ab281c9226223b81a92db655d_2051647_src.c:369039:= 111: error: conversion \ from 'long long unsigned int' to 'long unsigned int' changes value from '18446744070503413664' to \ '1088829344' [-Werror=3Doverflow] 369039 | l->__retvalue =3D (((((int64_t) (({ unsigned long addr =3D 0; ad= dr =3D _stp_kmodule_relocate \ ("kernel", "_stext", 0xffffffff40e637a0); addr; }))))) & (((int64_t)4294967295LL))); |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 \ ^~~~~~~~~~~~~~~~~~ /tmp/stapwwHXqw/stap_2fcc2a5ab281c9226223b81a92db655d_2051647_src.c: In function 'function___priva\ te__notnfs_smakarov_stap_checkout_testsuite_systemtap_base_rlimit_stp__dwar= f_tvar_get_patch_268': /tmp/stapwwHXqw/stap_2fcc2a5ab281c9226223b81a92db655d_2051647_src.c:376520:= 111: error: conversion \ from 'long long unsigned int' to 'long unsigned int' changes value from '18446744070503409568' to \ '1088825248' [-Werror=3Doverflow] 376520 | l->__retvalue =3D (((((int64_t) (({ unsigned long addr =3D 0; ad= dr =3D _stp_kmodule_relocate \ ("kernel", "_stext", 0xffffffff40e627a0); addr; }))))) & (((int64_t)4294967295LL))); |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 \ ^~~~~~~~~~~~~~~~~~ --=20 You are receiving this mail because: You are the assignee for the bug.=