Hello community, here is the log from the commit of package swig for openSUSE:Factory checked in at 2012-03-07 13:45:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/swig (Old) and /work/SRC/openSUSE:Factory/.swig.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "swig", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/swig/swig.changes 2012-03-06 14:07:13.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.swig.new/swig.changes 2012-03-07 13:45:51.000000000 +0100 @@ -1,0 +2,9 @@ +Tue Mar 6 19:24:07 UTC 2012 - [email protected] + +- The perl 5.12 packages are compiled with -Duse64bitint, which + means that IVs are 64-bits even on 32-bit architectures. When + converting IVs, SWIG assumes that an IV is the same size as a + long, which causes OverflowErrors with unsigned longs when + the value is greater than 2^31. + +------------------------------------------------------------------- New: ---- swig-2.0.4-fix-overflow-error-64bitint.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ swig.spec ++++++ --- /var/tmp/diff_new_pack.ZeQ3ee/_old 2012-03-07 13:45:53.000000000 +0100 +++ /var/tmp/diff_new_pack.ZeQ3ee/_new 2012-03-07 13:45:53.000000000 +0100 @@ -67,6 +67,7 @@ Patch4: swig-2.0.4-disable-broken-tests_rhel4.patch # PATCH-FIX-UPSTREAM swig-2.0.4-guile2.patch [email protected] -- generate guile 2 friendly code Patch5: swig-2.0.4-guile2.patch +Patch6: swig-2.0.4-fix-overflow-error-64bitint.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -131,6 +132,7 @@ %if 0%{?suse_version} >= 1210 %patch5 -p1 %endif +%patch6 -p1 %build %configure --disable-ccache ++++++ swig-2.0.4-fix-overflow-error-64bitint.patch ++++++ Description: Fix overflow errors with 64-bit IVs The perl 5.12 packages are compiled with -Duse64bitint, which means that IVs are 64-bits even on 32-bit architectures. When converting IVs, SWIG assumes that an IV is the same size as a long, which causes OverflowErrors with unsigned longs when the value is greater than 2^31. . This patch should remove those assumptions by using the "IV" type defined by the perl headers, and explicitly checking the values are within the correct range for the type being converted. Author: Chris Butler <[email protected]> Bug-Debian: http://bugs.debian.org/579540 Forwarded: no --- a/Lib/perl5/perlprimtypes.swg +++ b/Lib/perl5/perlprimtypes.swg @@ -56,8 +56,13 @@ SWIG_AsVal_dec(long)(SV *obj, long* val) { if (SvIOK(obj)) { - if (val) *val = SvIV(obj); - return SWIG_OK; + IV v = SvIV(obj); + if (v >= LONG_MIN && v <= LONG_MAX) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } } else { int dispatch = 0; const char *nptr = SvPV_nolen(obj); @@ -108,11 +113,16 @@ SWIG_AsVal_dec(unsigned long)(SV *obj, unsigned long *val) { if (SvUOK(obj)) { - if (val) *val = SvUV(obj); - return SWIG_OK; + UV v = SvUV(obj); + if (v >= 0 && v <= ULONG_MAX) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } } else if (SvIOK(obj)) { - long v = SvIV(obj); - if (v >= 0) { + IV v = SvIV(obj); + if (v >= 0 && v <= ULONG_MAX) { if (val) *val = v; return SWIG_OK; } else { @@ -179,8 +189,13 @@ SWIG_AsVal_dec(long long)(SV *obj, long long *val) { if (SvIOK(obj)) { - if (val) *val = SvIV(obj); - return SWIG_OK; + IV v = SvIV(obj); + if (v >= LLONG_MIN && v <= LLONG_MAX) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } } else { int dispatch = 0; const char *nptr = SvPV_nolen(obj); @@ -246,8 +261,8 @@ if (val) *val = SvUV(obj); return SWIG_OK; } else if (SvIOK(obj)) { - long v = SvIV(obj); - if (v >= 0) { + IV v = SvIV(obj); + if (v >= 0 && v <= ULLONG_MAX) { if (val) *val = v; return SWIG_OK; } else { -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
