Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 897782 - sci-mathematics/gfan-0.6.2-r4 fails tests (HARDENED-SYSTEM): Assertion __n < this->size() failed
Summary: sci-mathematics/gfan-0.6.2-r4 fails tests (HARDENED-SYSTEM): Assertion __n < ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 884417
  Show dependency tree
 
Reported: 2023-02-26 07:34 UTC by Agostino Sarubbo
Modified: 2024-10-05 13:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,103.50 KB, text/plain)
2023-02-26 07:34 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-02-26 07:34:18 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: sci-mathematics/gfan-0.6.2-r4 fails tests (HARDENED-SYSTEM).
Discovered on: amd64 (internal ref: hardened_tinderbox)

NOTE:
(HARDENED-SYSTEM) in the summary means that the bug was found on a machine that runs an hardened profile with -D_FORTIFY_SOURCE=3 and -D_GLIBCXX_ASSERTIONS (https://www.gentoo.org/support/news-items/2023-01-01-hardening-fortify-assertions.html) but this bug MAY or MAY NOT BE related to the changes related to hardened.
Comment 1 Agostino Sarubbo gentoo-dev 2023-02-26 07:34:20 UTC
Created attachment 854686 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-02-26 07:34:21 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_vector.h:1123: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; reference = std::pair<int, int>&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
rm: cannot remove 'GfAnTeMpTeStS': No such file or directory
Comment 3 Michael Orlitzky gentoo-dev 2024-10-05 04:19:10 UTC
More of the same with -r5:

$ echo 'Q[x, y, z]{x^2-y-1,y^2-z-1,z^2-x-1}' | gfan_mixedvolume 
/usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/stl_vector.h:1128: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; reference = std::pair<int, int>&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted

$ echo 'Q[x, y]{2*x^8*y^4+x^7*y^3-x+1,x^8*y^4+3*x^7*y^3+y+2}' | gfan_mixedvolume 
/usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/stl_vector.h:1128: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; reference = std::pair<int, int>&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted

gfan-0.7 is out, but makes things even worse by using unportable gcc-only types.
Comment 4 Larry the Git Cow gentoo-dev 2024-10-05 13:11:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f27391fc418baa5ce0f4b08e32235adb547d4e9f

commit f27391fc418baa5ce0f4b08e32235adb547d4e9f
Author:     Michael Orlitzky <mjo@gentoo.org>
AuthorDate: 2024-10-05 12:53:03 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2024-10-05 13:09:19 +0000

    sci-mathematics/gfan: new patch to fix out-of-bounds indexing
    
    Fix the SageMath test suite by making sure gfan_mixedvolume doesn't
    crash.
    
    Closes: https://bugs.gentoo.org/897782
    Signed-off-by: Michael Orlitzky <mjo@gentoo.org>

 .../gfan/files/gfan-0.6.2-glibcxx-assertions.patch | 39 ++++++++++++++++++++++
 .../{gfan-0.6.2-r5.ebuild => gfan-0.6.2-r6.ebuild} |  1 +
 2 files changed, 40 insertions(+)