An added non-ASCII character case breaks compiled runs
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 75/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- c, cpp, java, javascript
- 領域
- testing-qa, tooling
調査の方向性
web/compiler-explorer.js の charLiteral と web/runners.js の candidateTypeMatches から始めて、文字のケースがどのように生成され、受け入れられるかを追跡してください。これらの経路をカバーするテストを見つけ、é と絵文字のケースを追加してください。どちらかの非ASCII文字を追加すると、その文字を示すメッセージとともに拒否され、テストが通れば完了です。
索引モデルが issue の本文から書いたものです。
説明
Observed behavior
An added character case whose cell is a non-ASCII character, such as é or an emoji, is written raw between quotes by charLiteral. C and C++ never hand it over as typed, and Java does only within the Basic Multilingual Plane:
- C is built with clang on Compiler Explorer, and clang 21 (
-std=c17) refuses the literal, so the run reports a compile failure. - C++ is built with gcc there, and g++ 15 (
-std=c++20) reads'é'as a multi-character constant, warns, and the solution receives -87 instead of the character. A correct solution can fail the case silently. - Java runs on JDK 25 there, and javac 25 receives
écorrectly (233) but refuses an emoji ("character literal contains more than one UTF-16 code unit"). gino1203 reported an earlier javac that accepts it and passes only the high surrogate, 55357.
Python and JavaScript are not affected.
Expected behavior
A character case either reaches every compiled language as typed or is refused when the case is added, with a message that names the character, as an integer outside 32 bits already is.
Reproduction
At main after #683, with the checkout's web/compiler-explorer.js:
const { nativeLiteral } = await import("./web/compiler-explorer.js");
nativeLiteral("é", "character", "cpp"); // "'é'", raw UTF-8 between quotes
Compiling char c = <that literal>; printf("%d", c); gives -87 with g++ 15 and refuses to compile with clang++ 21; the same in C. Checked locally with gcc 15, clang 21 and Java 25.
Initial analysis
- Path:
charLiteralinweb/compiler-explorer.jsescapes quotes, backslashes and, after #683, U+0000 to U+001F; every other character is written as is. - Reach:
candidateTypeMatchesinweb/runners.jsaccepts any single code point as acharacter. - Domain: the six
characterjudges (copper-pad-continuity,letter-grid-tracer,letter-panel-tracing,puzzle-grid-save-check,rooftop-panel-footprint,sealed-air-pocket-backfill) take letters, digits,.,0or1, all ASCII. A C or C++charcannot hold a character outside ASCII as one value, so refusing a non-ASCIIcharacterwhen the case is added is simpler than encoding it.
Action items
- Refuse a non-ASCII
charactercase when it is added, naming the character. - Add a test that fails on
mainforéand an emoji.
Raised by gino1203 in a review of #683.
- 主要言語
- Rust
- スター
- 228
- フォーク
- 150
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 226
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sysprog21/codetrial のほかの issue
-
Spot Capacity Round Trips tests accept the two largest rising runs対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Diagnostic category comment disagrees with its tests対応中かも @woohsin が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
sysprog21/codetrial#666 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Local recording ends at Finish, before the learning review対応中かも @richard81115 が 2 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
sysprog21/codetrial#663 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Task editor scroll-sync test fails intermittently in CI対応中かも @melonpuff が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
sysprog21/codetrial#654 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
sysprog21/codetrial#646 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
sysprog21/codetrial の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
asonnino/blockchain-validator#88 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
storytold/photocraft#14025 ·
メンテナーはふだん 1 日以内に返信
-
Extrudeオープンarea:kernel bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
bherbruck/solvecraft#16273 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
storytold/vectorcraft#7242 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信