Legacy bs_put_utf8/16/32 raise unsupported at a non-byte-aligned offset
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
opcodesswitch.h の OP_BS_PUT_UTF8、OP_BS_PUT_UTF16、OP_BS_PUT_UTF32 を、bitstring_insert_utf8/16/32 ヘルパーおよび #2357 の変更とあわせて読む。erlc +no_bs_create_bin +no_bs_match +no_type_opt でコンパイルしたコードを使って再現し、インタープリター上で実行する。レガシーオペコードがバイト境界に揃っていないオフセットを受け入れ、例が示されたビットストリングを生成すれば完了。
索引モデルが issue の本文から書いたものです。
説明
With the legacy construction opcodes (code compiled by OTP 24 or older, or with +no_bs_create_bin), a utf8, utf16 or utf32 segment that does not start on a byte boundary raises unsupported:
C = id($a),
<<1:1, C/utf8>> %% OTP 27 <<176,1:1>> AtomVM unsupported
<<1:1, C/utf16>> %% OTP 27 <<128,48,1:1>> AtomVM unsupported
<<1:1, C/utf32>> %% OTP 27 <<128,0,0,48,1:1>> AtomVM unsupported
<<C/utf8, 1:1, C/utf8>> %% OTP 27 <<97,176,1:1>> AtomVM unsupported
Compiled with OTP 27 erlc +no_bs_create_bin +no_bs_match +no_type_opt and run on the interpreter (the JIT compiler does not accept these opcodes).
Cause: OP_BS_PUT_UTF8, OP_BS_PUT_UTF16 and OP_BS_PUT_UTF32 in opcodesswitch.h still reject ctx->bs_offset % 8 != 0 before calling bitstring_insert_utf8/16/32. With #2357 those helpers write at any bit offset (bs_create_bin already uses them that way), so the three checks can be removed once #2357 is merged.
- 主要言語
- Erlang
- スター
- 2.3k
- フォーク
- 171
- 平均マージ
- 5日 11時間
- マージ済み PR(30日)
- 19
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
atomvm/AtomVM のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
atomvm/AtomVM#2435 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
atomvm/AtomVM#2429 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 2 日以内に返信
似ている issue
-
Mend: dependency security vulnerability untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
opensearch-project/k-NN#3693 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
radius-project/radius#13744 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
Significant-Gravitas/AutoGPT#16733 ·
メンテナーはふだん 1 日以内に返信
-
changelog investigate
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
ramnes/notion-sdk-py#444 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Automattic/data-liberation-agent#1657 ·
メンテナーはふだん 1 日以内に返信