Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`.subsections_via_symbols` directive causes invalid symbol pruning in macOS x86-64 kernels

オープン
#6,089 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c, macos
領域
backend, compilers

調査の方向性

Reproduce the issue with the provided sasum.c command and OpenBLAS build invocation, then inspect the sasum_k kernel and the generated .L998/.L999 labels. Trace the macOS x86-64 shared-library link path and determine why deduplication occurs without -Wl,-no_deduplicate; done means cblas_sasum prints 11 without requiring an external workaround.

索引モデルが issue の本文から書いたものです。

説明

// sasum.c
#include <stdio.h>
#include <cblas.h>
int main(void) {
  float x[5] = {3, -1, 2, -4, 1};
  printf("cblas_sasum = %g\n", cblas_sasum(5, x, 1));   // expect 11
  return 0;
}
$ clang -arch x86_64 -O2 -I$(BUILD_DIR) sasum.c -L$(BUILD_DIR) -lopenblas -Wl,-rpath,$(BUILD_DIR) -o sasum_dyn
$ ./sasum_dyn
cblas_sasum = 4.01598e-36

The correct output is:

$ ./sasum_dyn
cblas_sasum = 11

OpenBLAS built with make TARGET=NEHALEM NOFORTRAN=1 (on Apple Silicon, the full invocation is arch -x86_64 make -j6 ARCH=x86_64 BINARY=64 CC="clang -arch x86_64" HOSTCC="clang -arch x86_64" TARGET=NEHALEM NOFORTRAN=1 shared) with Apple clang 21.0.0

The problem is that even without -Wl,-dead-strip the linker will still try to deduplicate labels unless -Wl,-no_deduplicate is provided explicitly. This happens to .L998 and .L999 in the sasum_k kernel.

I am testing via Rosetta on AArch64 macOS hardware, but I suspect this reproduces on proper x86-64 macOS targets.

主要言語
C
スター
7.6k
フォーク
1.7k
平均マージ
1日 5時間
マージ済み PR(30日)
57

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OpenMathLib/OpenBLAS のほかの issue

OpenMathLib/OpenBLAS の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。