get invalid pointer or invalid free() error when copying adjacency_matrix to a vector
メンテナーはふだん 1 日以内に返信
@jeremy-murphy がすでに取り組んでいます。
2022年12月19日 から。
評価
この issue はまだ評価されていません。
説明
I have been trying to preload adjacency matrices with bundled properties to a std::vector of adjacency matrices in order to benchmark some uni project algorithm and not by chance measure the time to set up the graph.
In that instance i tried different approaches to copy a prototype g0:
- std::fill wouldn't work as AM is not a value type.
- boost::copy_graph() wouldn't work due to AM not being a list type
- using std::vector::emplace to construct the graph in place using a constructor declared in the documentation and the AM.hpp: one (of 2) with the edge iterators and num_nodes. * Luckily boost::edges(graph_t) provides such a thing. But it wouldn't work as the edge-iterator-pair provided does not include a .first member. There is one that needs an a property iterator ep_it. i haven't found any information on how do make one and if this is meant for bundled properties.
- using std::vector::push_back(g0) which works until the final "}" and then crashes when freeing or with a "munmap_chunk(): invalid pointer" error. g0 being a predefined graph i want to fill the vector with. It seems plausible as AM seems to be copy constructible. But apparently not entirely. Or maybe the property maps aren't.
However: after running through the algorithms there seems to be no change to g0. So it does not seem to be a "shallow copy" problem. Also valgrind does not report any memory leaks. But lots of errors.
This also happens when copy constructing only 2 graphs.
- on a sidenote: the documentation for iterator constructible suggests passing the number of edges too as it may speed up some processes. The AM does not seem to provide such a thing in the documentation in the section member functions (i.e. constructors).
- 主要言語
- C++
- スター
- 399
- フォーク
- 247
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 40
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
boostorg/graph のほかの issue
-
Good first issues: start contributing to Boost.Graph here再び着手できるかも @andreacassioli が 7 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbeginner friendly
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
boostorg/graph#593 · コメント 47 件 ·
メンテナーはふだん 1 日以内に返信
-
algorithm beginner friendly priority: high
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
boostorg/graph#231 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Trivial Minimum Cycle Ratio Failing対応中かも @Becheler が 10 日前に担当しました。 オープンalgorithm
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
boostorg/graph#599 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
メンテナーはふだん 1 日以内に返信
-
Implementing personalized PageRank for graph node scoring.対応中かも @Becheler が 145 日前に担当しました。 オープンalgorithm
boostorg/graph#493 · コメント 22 件 · リアクション 1 件 · 担当者 2 名 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
Web3 RPC: one-element batch request returns an object instead of an array (breaks ethers.js v6)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
FISCO-BCOS/FISCO-BCOS#5706 ·
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
521xueweihan/HelloGitHub#4011 ·
-
docs(simulation): Quickstart publishes UDP 14550, which the SITL images' own docs say not to doオープンstatus:needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
PX4/PX4-Autopilot#29292 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug core p3
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
RunanywhereAI/runanywhere-sdks#1142 ·
メンテナーはふだん 1 日以内に返信
-
I/O internal correctness medium priority rt_lib
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信