boostorg / boostorg/multi_array

valgrind warning when allocating large amount of memory

未关闭
#23 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
32
派生
39
PR 合并指标
30 天内没有已合并 PR

描述

The following program:
```
#include "boost/multi_array.hpp"
using Emax = boost::multi_array;

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
```

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先,使用报告中的 GCC 版本,在 Valgrind 3.15.0 下编译并运行 issue 中所示的程序。阅读构造七维数组时涉及的 Boost.MultiArray 分配路径,并验证大范围警告是否表明存在库问题;完成的标准是找出原因并添加适当的回归测试或记录解决方案。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
data
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。