This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/21991] New: on 32-bit systems, getting "shift count >= width of type" gcc errors


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]