This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 745 - Memory corruption in test sparse_product_2
Summary: Memory corruption in test sparse_product_2
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - matrix products (show other bugs)
Version: 3.2
Hardware: All All
: Normal Unknown
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-18 19:37 UTC by Benoit Steiner
Modified: 2019-12-04 13:01 UTC (History)
0 users



Attachments

Description Benoit Steiner 2014-02-18 19:37:04 UTC
When compiled on Ubuntu with gcc 4.8 and SSE3 enabled, the test fails sometimes for seed 1392677379. Valgrind identified a memory corruption which probably explains the flakiness:

valgrind ./sparse_product_2 s1392677379
==28557== Memcheck, a memory error detector
==28557== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==28557== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==28557== Command: ./sparse_product_2 s1392677379
==28557== 
Initializing random number generator with seed 1392677379
Repeating each test 10 times
==28557== Invalid write of size 8
==28557==    at 0x425FBF: Eigen::internal::AmbiVector<std::complex<double>, int>::coeffRef(int) (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x4185CE: _ZN5Eigen8internalL39sparse_sparse_product_with_pruning_implINS_12SparseMatrixISt7complexIdELi1EiEES5_S5_EEvRKT_RKT0_RT1_RKNSC_10RealScalarE.constprop.1799 (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x4503C2: void sparse_product<Eigen::SparseMatrix<std::complex<double>, 1, int> >() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x419EF2: test_sparse_product() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x41419D: main (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==  Address 0x6df4ea0 is 0 bytes after a block of size 160 alloc'd
==28557==    at 0x4C2AC27: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28557==    by 0x41842A: _ZN5Eigen8internalL39sparse_sparse_product_with_pruning_implINS_12SparseMatrixISt7complexIdELi1EiEES5_S5_EEvRKT_RKT0_RT1_RKNSC_10RealScalarE.constprop.1799 (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x4503C2: void sparse_product<Eigen::SparseMatrix<std::complex<double>, 1, int> >() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x419EF2: test_sparse_product() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x41419D: main (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557== 
==28557== Invalid read of size 8
==28557==    at 0x4185E3: _ZN5Eigen8internalL39sparse_sparse_product_with_pruning_implINS_12SparseMatrixISt7complexIdELi1EiEES5_S5_EEvRKT_RKT0_RT1_RKNSC_10RealScalarE.constprop.1799 (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x4503C2: void sparse_product<Eigen::SparseMatrix<std::complex<double>, 1, int> >() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x419EF2: test_sparse_product() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x41419D: main (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==  Address 0x6df4ea0 is 0 bytes after a block of size 160 alloc'd
==28557==    at 0x4C2AC27: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28557==    by 0x41842A: _ZN5Eigen8internalL39sparse_sparse_product_with_pruning_implINS_12SparseMatrixISt7complexIdELi1EiEES5_S5_EEvRKT_RKT0_RT1_RKNSC_10RealScalarE.constprop.1799 (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x4503C2: void sparse_product<Eigen::SparseMatrix<std::complex<double>, 1, int> >() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x419EF2: test_sparse_product() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x41419D: main (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557== 
==28557== Invalid write of size 8
==28557==    at 0x4185E8: _ZN5Eigen8internalL39sparse_sparse_product_with_pruning_implINS_12SparseMatrixISt7complexIdELi1EiEES5_S5_EEvRKT_RKT0_RT1_RKNSC_10RealScalarE.constprop.1799 (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x4503C2: void sparse_product<Eigen::SparseMatrix<std::complex<double>, 1, int> >() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x419EF2: test_sparse_product() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x41419D: main (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==  Address 0x6df4ea0 is 0 bytes after a block of size 160 alloc'd
==28557==    at 0x4C2AC27: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28557==    by 0x41842A: _ZN5Eigen8internalL39sparse_sparse_product_with_pruning_implINS_12SparseMatrixISt7complexIdELi1EiEES5_S5_EEvRKT_RKT0_RT1_RKNSC_10RealScalarE.constprop.1799 (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x4503C2: void sparse_product<Eigen::SparseMatrix<std::complex<double>, 1, int> >() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x419EF2: test_sparse_product() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x41419D: main (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557== 
==28557== Invalid read of size 8
==28557==    at 0x4186B7: _ZN5Eigen8internalL39sparse_sparse_product_with_pruning_implINS_12SparseMatrixISt7complexIdELi1EiEES5_S5_EEvRKT_RKT0_RT1_RKNSC_10RealScalarE.constprop.1799 (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x4503C2: void sparse_product<Eigen::SparseMatrix<std::complex<double>, 1, int> >() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x419EF2: test_sparse_product() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x41419D: main (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==  Address 0x6df4ea0 is 0 bytes after a block of size 160 alloc'd
==28557==    at 0x4C2AC27: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28557==    by 0x41842A: _ZN5Eigen8internalL39sparse_sparse_product_with_pruning_implINS_12SparseMatrixISt7complexIdELi1EiEES5_S5_EEvRKT_RKT0_RT1_RKNSC_10RealScalarE.constprop.1799 (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x4503C2: void sparse_product<Eigen::SparseMatrix<std::complex<double>, 1, int> >() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x419EF2: test_sparse_product() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x41419D: main (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557== 
==28557== Invalid read of size 8
==28557==    at 0x418776: _ZN5Eigen8internalL39sparse_sparse_product_with_pruning_implINS_12SparseMatrixISt7complexIdELi1EiEES5_S5_EEvRKT_RKT0_RT1_RKNSC_10RealScalarE.constprop.1799 (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x4503C2: void sparse_product<Eigen::SparseMatrix<std::complex<double>, 1, int> >() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x419EF2: test_sparse_product() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x41419D: main (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==  Address 0x6df4ea0 is 0 bytes after a block of size 160 alloc'd
==28557==    at 0x4C2AC27: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28557==    by 0x41842A: _ZN5Eigen8internalL39sparse_sparse_product_with_pruning_implINS_12SparseMatrixISt7complexIdELi1EiEES5_S5_EEvRKT_RKT0_RT1_RKNSC_10RealScalarE.constprop.1799 (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x4503C2: void sparse_product<Eigen::SparseMatrix<std::complex<double>, 1, int> >() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x419EF2: test_sparse_product() (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557==    by 0x41419D: main (in /usr/local/google/home/bsteiner/EigenLatest/build/test/sparse_product_2)
==28557== 
==28557== 
==28557== HEAP SUMMARY:
==28557==     in use at exit: 0 bytes in 0 blocks
==28557==   total heap usage: 17,127 allocs, 17,127 frees, 116,342,441 bytes allocated
==28557== 
==28557== All heap blocks were freed -- no leaks are possible
==28557== 
==28557== For counts of detected and suppressed errors, rerun with: -v
==28557== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 2 from 2)
Comment 1 Nobody 2019-12-04 13:01:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/745.

Note You need to log in before you can comment on or make changes to this bug.