Troubleshoot "dangling pointer" warning in `iterator_interface.t.cpp`
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
- 領域
- testing-qa
調査の方向性
まず src/beman/iterator_interface26/iterator_interface.t.cpp の CI 警告を再現します。特に OperatorArrow の 117 行目を確認し、include/beman/iterator_interface26/detail/stl_interfaces/iterator_interface.hpp の 559 行目にある参照先の実装を調査してください。dangling pointer 診断の原因を特定し、その後、警告がなくなり、関連するテストが引き続き成功することを確認してください。
索引モデルが issue の本文から書いたものです。
説明
This warning shows up in the CI job. It was originally pointed out by https://github.com/beman-project/iterator_interface/pull/13#pullrequestreview-2421895988
/home/runner/work/iterator_interface/iterator_interface/src/beman/iterator_interface26/iterator_interface.t.cpp:5:
/home/runner/work/iterator_interface/iterator_interface/src/beman/iterator_interface26/iterator_interface.t.cpp: In member function ‘virtual void beman::iterator_interface26::IteratorTest_OperatorArrow_Test::TestBody()’:
/home/runner/work/iterator_interface/iterator_interface/src/beman/iterator_interface26/iterator_interface.t.cpp:117:20: warning: using a dangling pointer to an unnamed temporary [-Wdangling-pointer=]
117 | ASSERT_EQ(ai->f(), 3);
| ~~~~~^~
In file included from /home/runner/work/iterator_interface/iterator_interface/include/beman/iterator_interface26/iterator_interface.hpp:8,
from /home/runner/work/iterator_interface/iterator_interface/src/beman/iterator_interface26/iterator_interface.t.cpp:2:
/home/runner/work/iterator_interface/iterator_interface/include/beman/iterator_interface26/detail/stl_interfaces/iterator_interface.hpp:559:59: note: unnamed temporary defined here
559 | return detail::make_pointer<pointer, reference>(*derived());
| ^~~~~~~~~~
- 主要言語
- C++
- スター
- 12
- フォーク
- 10
- 平均マージ
- 1時間 43分
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bemanproject/iterator_interface のほかの issue
-
GCC 15 Support オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
bemanproject/iterator_interface#42 · 担当者 1 名 ·
-
bemanproject/iterator_interface#18 · コメント 1 件 · 担当者 1 名 ·
bemanproject/iterator_interface の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
duckdb/duckdb-wasm#2258 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
objectionary/eo-graphs#75 ·
-
Coarray integration tests carry no LABELS, so run_tests.py silently skips them under every backend オープンcoarray
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
FISCO-BCOS/FISCO-BCOS#5642 ·