* [Bug translator/21991] New: on 32-bit systems, getting "shift count >= width of type" gcc errors
@ 2017-08-22 15:35 dsmith at redhat dot com
2017-08-23 13:43 ` [Bug translator/21991] " dsmith at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: dsmith at redhat dot com @ 2017-08-22 15:35 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=21991
Bug ID: 21991
Summary: on 32-bit systems, getting "shift count >= width of
type" gcc errors
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
Assignee: systemtap at sourceware dot org
Reporter: dsmith at redhat dot com
Target Milestone: ---
On 2.6.32-696.6.3.el6.i686, I'm seeing lots of errors like the following:
====
# stap --rlimit-as=1 --rlimit-as=999999999999 -wp4
/root/src.copy/testsuite/systemtap.base/rlimit.stp
cc1: warnings being treated as errors
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c: In function
‘function___private__root_src_copy_testsuite_systemtap_base_rlimit_stp__dwarf_tvar_get_addr_73’:
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:171014:
error: left shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:171014:
error: right shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c: In function
‘function___private__root_src_copy_testsuite_systemtap_base_rlimit_stp__dwarf_tvar_get_addrinarray_359’:
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:171053:
error: left shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:171053:
error: right shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c: In function
‘function___private__root_src_copy_testsuite_systemtap_base_rlimit_stp__dwarf_tvar_get_arch_2000’:
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:171573:
error: left shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:171573:
error: right shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c: In function
‘function___private__root_src_copy_testsuite_systemtap_base_rlimit_stp__dwarf_tvar_get_blocks_in_map_1522’:
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:172847:
error: left shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:172847:
error: right shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c: In function
‘function___private__root_src_copy_testsuite_systemtap_base_rlimit_stp__dwarf_tvar_get_c_487’:
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:174264:
error: left shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:174264:
error: right shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c: In function
‘function___private__root_src_copy_testsuite_systemtap_base_rlimit_stp__dwarf_tvar_get_c_500’:
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:174303:
error: left shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:174303:
error: right shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c: In function
‘function___private__root_src_copy_testsuite_systemtap_base_rlimit_stp__dwarf_tvar_get_ch_2558’:
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:174732:
error: left shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:174732:
error: right shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c: In function
‘function___private__root_src_copy_testsuite_systemtap_base_rlimit_stp__dwarf_tvar_get_ct_3976’:
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:176838:
error: left shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:176838:
error: right shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c: In function
‘function___private__root_src_copy_testsuite_systemtap_base_rlimit_stp__dwarf_tvar_get_fault_index_2110’:
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:181635:
error: left shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:181635:
error: right shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c: In function
‘function___private__root_src_copy_testsuite_systemtap_base_rlimit_stp__dwarf_tvar_get_rc_1791’:
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:197391:
error: left shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:197391:
error: right shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c: In function
‘function___private__root_src_copy_testsuite_systemtap_base_rlimit_stp__dwarf_tvar_get_type_1452’:
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:202994:
error: left shift count >= width of type
/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.c:202994:
error: right shift count >= width of type
make[1]: ***
[/tmp/stapOZvtrw/stap_0b30f490824e1d37b2f34bd682c2fa8c_897109_src.o] Error 1
make: *** [_module_/tmp/stapOZvtrw] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed. [man error::pass4]
====
They are coming from the translator generated code that looks like the
following:
====
l->__retvalue = ((k_fetch_register(1)) << ((((int64_t)32LL)) & 63)) >>
((((int64_t)32LL)) & 63);
====
Evidently the translator assumes k_fetch_register() returns a 64-bit value,
which isn't true on a 32-bit system.
In a full testsuite run, I see 380 of these errors.
(Note that this doesn't happen with the pre-bpf code.)
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug translator/21991] on 32-bit systems, getting "shift count >= width of type" gcc errors
2017-08-22 15:35 [Bug translator/21991] New: on 32-bit systems, getting "shift count >= width of type" gcc errors dsmith at redhat dot com
@ 2017-08-23 13:43 ` dsmith at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: dsmith at redhat dot com @ 2017-08-23 13:43 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=21991
David Smith <dsmith at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from David Smith <dsmith at redhat dot com> ---
Fixed in commit e301187ef by casting to 64-bits when shifting.
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-23 13:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-22 15:35 [Bug translator/21991] New: on 32-bit systems, getting "shift count >= width of type" gcc errors dsmith at redhat dot com
2017-08-23 13:43 ` [Bug translator/21991] " dsmith at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).