This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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 target/84945] [8 Regression] UBSAN: gcc/config/i386/i386.c:33312:22: runtime error: shift exponent 32 is too large for 32-bit type 'int'


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84945

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 43696
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43696&action=edit
gcc8-pr84945.patch

Untested fix.
I think this ought to work well on x86_64/i?86-linux, but I'm afraid is going
to be an ABI change otherwise, because __cpu_model exported out of libgcc will
change in that case size and objects referencing it might have copy relocations
against it.

Another possibility is not to add the extra features into
__cpu_model.__cpu_features, but add a new variable (say __cpu_features2), and
make sure to not add this variable at all into libgcc_s.so.1 (i.e. force it to
be libgcc.a only), then __builtin_cpu_supports for these new features would
always link in the libgcc.a(cpuinfo.o).

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