avr: errno does not link: __errno_location is not in the C library
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- c
- 領域
- embedded-iot
調査の方向性
AVR の errno 実装と tests/conformance/test_smoke.c の適合性チェックから始め、他の port がどのように __errno_location を提供しているか、また AVR がスレッド間で errno をどのように扱うかを確認します。報告されたプログラムがリンクされ、errno チェックに合格するよう AVR の実装を追加し、その後 Uno ターゲットの適合性テストを実行します。
索引モデルが issue の本文から書いたものです。
説明
An AVR program that uses errno does not link: <errno.h> defines errno as (*__errno_location()) for every target but Darwin, and the AVR C library does not define __errno_location. EmbCC 0.1.0 (macOS aarch64 release).
#include <errno.h>
#include <stdlib.h>
int main(void) { errno = 0; long v = strtol("99999999999999999999", 0, 10); return (errno == ERANGE && v != 0) ? 0 : 1; }
$ embcc --target=avr -mmcu=atmega328p -Os errno.c -o errno.elf
embld: undefined symbol '__errno_location' (referenced by errno-avr.elf.embcc-tmp.o)
Where EmbLinkRTOS meets it: tests/conformance/test_smoke.c checks errno after an out-of-range strtol, as the C library does it on every port; on the Uno it is the one image that fails to link for this reason.
A single static int and an __errno_location returning its address would do for AVR, which has no threads of its own; the RTOS's tests state that errno is not per thread there.
Part of #184 (AVR).
- 主要言語
- C
- スター
- 1
- フォーク
- 2
- 平均マージ
- 20時間 55分
- マージ済み PR(30日)
- 73
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
EmbLinkOs/EmbCC のほかの issue
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 50/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
EmbLinkOs/EmbCC の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area: test kind: bug preview-effort: small priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
libsdl-org/SDL#16684 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
Issue-Bug Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信