qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] target-i386: Fix undefined behavior on bit shifts
@ 2015-09-29 20:34 Eduardo Habkost
  2015-09-29 20:34 ` [Qemu-devel] [PATCH 1/2] target-i386: Use 1UL for bit shift Eduardo Habkost
  2015-09-29 20:34 ` [Qemu-devel] [PATCH 2/2] target-i386: Don't left shift negative constant Eduardo Habkost
  0 siblings, 2 replies; 23+ messages in thread
From: Eduardo Habkost @ 2015-09-29 20:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Richard Henderson

This fixes two errors detected by clang:

  target-i386/cpu.c:1494:15: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
  target-i386/translate.c:2423:26: runtime error: left shift of negative value -8

Eduardo Habkost (2):
  target-i386: Use 1UL for bit shift
  target-i386: Don't left shift negative constant

 target-i386/cpu.c       | 2 +-
 target-i386/translate.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.1.0

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2015-10-23 18:21 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-29 20:34 [Qemu-devel] [PATCH 0/2] target-i386: Fix undefined behavior on bit shifts Eduardo Habkost
2015-09-29 20:34 ` [Qemu-devel] [PATCH 1/2] target-i386: Use 1UL for bit shift Eduardo Habkost
2015-09-30 13:27   ` Paolo Bonzini
2015-09-30 20:24     ` Richard Henderson
2015-10-01  8:29       ` Paolo Bonzini
2015-10-01  9:24       ` Peter Maydell
2015-10-01 13:52         ` Paolo Bonzini
2015-10-01 17:07           ` Laszlo Ersek
2015-10-01 17:30             ` Paolo Bonzini
2015-10-01 17:38               ` Peter Maydell
2015-10-01 19:17                 ` Laszlo Ersek
2015-10-02  8:34                   ` Paolo Bonzini
2015-10-02 11:14                     ` Laszlo Ersek
2015-10-02 12:07                       ` Paolo Bonzini
2015-10-04  2:34                         ` Kevin O'Connor
2015-10-01 20:35                 ` Markus Armbruster
2015-10-01 18:40               ` Laszlo Ersek
2015-10-02  8:48                 ` Paolo Bonzini
2015-09-29 20:34 ` [Qemu-devel] [PATCH 2/2] target-i386: Don't left shift negative constant Eduardo Habkost
2015-10-01  1:35   ` Richard Henderson
2015-10-01 17:06     ` Eduardo Habkost
2015-10-23 15:07       ` Eduardo Habkost
2015-10-23 18:20         ` Richard Henderson

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 NNTP newsgroup(s).