!4 回合上游补丁
From: @dongjiao-joan Reviewed-by: @yangzhao_kl Signed-off-by: @yangzhao_kl
This commit is contained in:
commit
16bf8d5411
@ -0,0 +1,25 @@
|
|||||||
|
From b65ff8f51b710a8496f3b2d7fc1fcbe7bc68ac53 Mon Sep 17 00:00:00 2001
|
||||||
|
From: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
|
||||||
|
Date: Tue, 23 Apr 2024 23:26:02 +0200
|
||||||
|
Subject: [PATCH] FIx leak on slices when converting a gexpr back to python
|
||||||
|
|
||||||
|
Fix https://github.com/serge-sans-paille/pythran/issues/2200
|
||||||
|
---
|
||||||
|
pythran/pythonic/types/ndarray.hpp | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/pythran/pythonic/types/ndarray.hpp b/pythran/pythonic/types/ndarray.hpp
|
||||||
|
index d0aa75925..191933ccd 100644
|
||||||
|
--- a/pythran/pythonic/types/ndarray.hpp
|
||||||
|
+++ b/pythran/pythonic/types/ndarray.hpp
|
||||||
|
@@ -1531,6 +1531,7 @@ PyObject *to_python<types::numpy_gexpr<Arg, S...>>::convert(
|
||||||
|
: ::to_python(v.slices);
|
||||||
|
PyObject *base = ::to_python(v.arg);
|
||||||
|
PyObject *res = PyObject_GetItem(base, slices);
|
||||||
|
+ Py_DECREF(slices);
|
||||||
|
Py_DECREF(base);
|
||||||
|
if (transpose) {
|
||||||
|
PyObject *Transposed =
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
@ -1,11 +1,12 @@
|
|||||||
%global _empty_manifest_terminate_build 0
|
%global _empty_manifest_terminate_build 0
|
||||||
Name: python-pythran
|
Name: python-pythran
|
||||||
Version: 0.14.0
|
Version: 0.14.0
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: An ahead of time compiler for a subset of the Python language.
|
Summary: An ahead of time compiler for a subset of the Python language.
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
URL: https://github.com/serge-sans-paille/pythran
|
URL: https://github.com/serge-sans-paille/pythran
|
||||||
Source0: https://files.pythonhosted.org/packages/2c/ab/a647b8cc3ac1aa07cde06875157696e4522958fb8363474bce21c302d4d8/pythran-0.14.0.tar.gz
|
Source0: https://files.pythonhosted.org/packages/2c/ab/a647b8cc3ac1aa07cde06875157696e4522958fb8363474bce21c302d4d8/pythran-0.14.0.tar.gz
|
||||||
|
Patch0: backport-fix-leak-on-slices-when-converting-a-gexpr-back-to-python.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%description
|
%description
|
||||||
An ahead of time compiler for a subset of the Python language, with a focus on scientific computing.
|
An ahead of time compiler for a subset of the Python language, with a focus on scientific computing.
|
||||||
@ -30,7 +31,7 @@ Provides: python3-pythran-doc
|
|||||||
Development documents and examples for pythran.
|
Development documents and examples for pythran.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n pythran-%{version}
|
%autosetup -p1 -n pythran-%{version}
|
||||||
sed -i 's/\~=/\>=/g' requirements.txt
|
sed -i 's/\~=/\>=/g' requirements.txt
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -73,5 +74,8 @@ mv %{buildroot}/doclist.lst .
|
|||||||
%{_docdir}/*
|
%{_docdir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue May 21 2024 dongjiao <dongjiao@kylinos.cn> - 0.14.0-2
|
||||||
|
- Fix memory leak on slices when converting a gexpr back to python
|
||||||
|
|
||||||
* Thu Nov 30 2023 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 0.14.0-1
|
* Thu Nov 30 2023 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 0.14.0-1
|
||||||
- Init package
|
- Init package
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user