Bus error when Catch2 tries catching an exception when using Clang 19
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
- 領域
- testing-qa
調査の方向性
Issue にある最小限の C++ 再現コードから始め、macOS 15 上で Catch2 v3.7.1 と Clang 19.1 を使ってビルドし、Catch2 が送出された例外を処理したときに bus error が発生することを確認します。通常の例外処理と REQUIRE_THROWS を比較します。Catch2 がクラッシュせず、妥当な出力を生成し、この動作を対象とする対応テストがある状態を完了とします。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When Catch2 catches an exception thrown by test code in Clang 19.1 (at least the version I have installed using homebrew on my Mac), it results in a Bus error: 10. This occurs regardless of whether or not the exception is raised inside a REQUIRE macro, so long as the exception is caught by Catch2. (If I set up a try block to catch the exception myself before any Catch2 code sees it, it doesn't seem to cause a problem.)
Expected behavior
Catch2 should catch the exception and produce some kind of reasonable output. If in a REQUIRE_THROWS macro where an appropriate exception is raised, the test should pass.
Reproduction steps
This test file was enough to trigger the problem for me:
#define CATCH_CONFIG_MAIN
#include "catch2/catch_test_macros.hpp"
TEST_CASE( "blah", "blah" ) {
SECTION( "blah" ) {
throw(std::runtime_error("Hi"));
}
}
I typically get output like this:
Randomness seeded to: 638767569
Bus error: 10
Platform information:
- OS: macOS 15
- Compiler+version: Clang 19.1 (from homebrew)
- Catch version: v3.7.1 (compiled from source with same version of Clang)
- 主要言語
- C++
- スター
- 21.6k
- フォーク
- 3.4k
- 平均マージ
- 3日 12時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
catchorg/Catch2 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 2 日以内に返信
-
catch_discover_tests passes all EXTRA_ARGS as one argument対応中かも @CyberKun が 11 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
catchorg/Catch2#3239 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Not seeing some error messages from fakeit in jetbrains rider対応中かも @Amanpal9 が 21 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
catchorg/Catch2#3228 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
catch_discover_tests fails for Emscripten/WASM tests since v3.16.0対応中かも @nafiurahman00 が 8 日前に担当しました。 オープンExtras
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
catchorg/Catch2#3241 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
catchorg/Catch2 の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cp-algorithms/cp-algorithms#1774 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
telefonicaid/fiware-orion#4836 ·
メンテナーはふだん 1 日以内に返信
-
nixd exits at startup when its parent process belongs to another user対応中かも @conao3 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nix-community/nixd#930 ·
メンテナーはふだん 2 日以内に返信
-
refactor topic-ui topic-weather
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Command-Install Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
microsoft/winget-cli#6718 ·
メンテナーはふだん 2 日以内に返信