valgrind warning when allocating large amount of memory

オープン
#23 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp
領域
data

調査の方向性

まず、issue に示されているプログラムを、報告されている GCC バージョンで Valgrind 3.15.0 上でコンパイルして実行します。7 次元配列の構築に関係する Boost.MultiArray のアロケーションパスを読み、大きな範囲に関する警告がライブラリの問題を示しているかどうかを確認します。原因を特定し、適切な回帰テストまたは文書化された解決策を追加すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

The following program:

#include "boost/multi_array.hpp"
using Emax = boost::multi_array<double, 7>; 

int main() {
    Emax emax(boost::extents[40][30][50][5][5][5][5]);
    return 0;
}

when run under valgrind gives the following warnings:

==20786== Memcheck, a memory error detector
==20786== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==20786== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==20786== Command: ./test_arr
==20786==
==20786== Warning: set address range perms: large range [0x5171040, 0x16f8b340) (undefined)
==20786== Warning: set address range perms: large range [0x5171028, 0x16f8b358) (noaccess)
==20786==
==20786== HEAP SUMMARY:
==20786==     in use at exit: 0 bytes in 0 blocks
==20786==   total heap usage: 2 allocs, 2 frees, 300,072,704 bytes allocated
==20786==
==20786== All heap blocks were freed -- no leaks are possible
==20786==
==20786== For lists of detected and suppressed errors, rerun with: -s
==20786== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

versions are:

gcc version 8.3.1 20190223 (Red Hat 8.3.1-2) (GCC)
valgrind-3.15.0
主要言語
C++
スター
32
フォーク
39
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

boostorg/multi_array のほかの issue

boostorg/multi_array の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。