glibc/sysdeps/hppa/fpu
Bruno Haible d082930272 hppa: Fix undefined behaviour in feclearexcept (BZ 30983)
The expression

  (excepts & FE_ALL_EXCEPT) << 27

produces a signed integer overflow when 'excepts' is specified as
FE_INVALID (= 0x10), because
  - excepts is of type 'int',
  - FE_ALL_EXCEPT is of type 'int',
  - thus (excepts & FE_ALL_EXCEPT) is (int) 0x10,
  - 'int' is 32 bits wide.

The patched code produces the same instruction sequence as
previosuly.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2023-12-19 15:12:38 -03:00
..
bits Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fclrexcpt.c hppa: Fix undefined behaviour in feclearexcept (BZ 30983) 2023-12-19 15:12:38 -03:00
fedisblxcpt.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
feenablxcpt.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fegetenv.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fegetexcept.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fegetmode.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fegetround.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
feholdexcpt.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fesetenv.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fesetexcept.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fesetmode.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fesetround.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
feupdateenv.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fgetexcptflg.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fpu_control.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fsetexcptflg.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ftestexcept.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
libm-test-ulps Update hppa libm-test-ulps 2021-09-06 17:37:29 +00:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00