From e3234c5986d29f4b16d26c68cb24dc61cd8c5a4dcd662668c5f8419408f32427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Tue, 25 Mar 2014 12:21:43 +0000 Subject: [PATCH 1/2] Accepting request 227434 from home:rguenther:branches:devel:languages:perl - perl-5.18.2-overflow.diff: avoid undefined overflow in S_sv_2iuv_common OBS-URL: https://build.opensuse.org/request/show/227434 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=108 --- perl-5.18.2-overflow.diff | 11 +++++++++++ perl.changes | 5 +++++ perl.spec | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 perl-5.18.2-overflow.diff diff --git a/perl-5.18.2-overflow.diff b/perl-5.18.2-overflow.diff new file mode 100644 index 0000000..f4ab898 --- /dev/null +++ b/perl-5.18.2-overflow.diff @@ -0,0 +1,11 @@ +--- sv.c.bak 2014-03-24 15:11:48.007595042 +0100 ++++ sv.c 2014-03-25 11:57:41.154752451 +0100 +@@ -2008,7 +2008,7 @@ S_sv_2iuv_common(pTHX_ SV *const sv) + if (SvNVX(sv) == (NV) SvIVX(sv) + #ifndef NV_PRESERVES_UV + && (((UV)1 << NV_PRESERVES_UV_BITS) > +- (UV)(SvIVX(sv) > 0 ? SvIVX(sv) : -SvIVX(sv))) ++ (UV)(SvIVX(sv) > 0 ? SvIVX(sv) : -SvUVX(sv))) + /* Don't flag it as "accurately an integer" if the number + came from a (by definition imprecise) NV operation, and + we're outside the range of NV integer precision */ diff --git a/perl.changes b/perl.changes index f1fab00..0fbbb4b 100644 --- a/perl.changes +++ b/perl.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Mar 25 11:06:56 UTC 2014 - rguenther@suse.com + +- perl-5.18.2-overflow.diff: avoid undefined overflow in S_sv_2iuv_common + ------------------------------------------------------------------- Sat Jan 18 19:08:31 UTC 2014 - schwab@suse.de diff --git a/perl.spec b/perl.spec index 5919a55..004b520 100644 --- a/perl.spec +++ b/perl.spec @@ -41,6 +41,7 @@ Patch7: perl-db6.diff Patch8: skip_time_hires.patch Patch9: perl-incfix.diff Patch10: perl-threads.t-timeout.diff +Patch11: perl-5.18.2-overflow.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: perl-base = %version #PreReq: %fillup_prereq @@ -176,6 +177,7 @@ cp -p %{S:3} . %endif %patch9 %patch10 -p1 +%patch11 %build cp -a lib savelib From d0abbbbdeda0baa1d70ee79cdb9a63b3a23c7ce494eb549176bbd7c85d951b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Tue, 25 Mar 2014 12:23:10 +0000 Subject: [PATCH 2/2] adapt overflow patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=109 --- perl-5.18.2-overflow.diff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perl-5.18.2-overflow.diff b/perl-5.18.2-overflow.diff index f4ab898..d89a47d 100644 --- a/perl-5.18.2-overflow.diff +++ b/perl-5.18.2-overflow.diff @@ -5,7 +5,7 @@ #ifndef NV_PRESERVES_UV && (((UV)1 << NV_PRESERVES_UV_BITS) > - (UV)(SvIVX(sv) > 0 ? SvIVX(sv) : -SvIVX(sv))) -+ (UV)(SvIVX(sv) > 0 ? SvIVX(sv) : -SvUVX(sv))) ++ (UV)(SvIVX(sv) > 0 ? (UV)SvIVX(sv) : -(UV)SvIVX(sv))) /* Don't flag it as "accurately an integer" if the number came from a (by definition imprecise) NV operation, and we're outside the range of NV integer precision */