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

OCP seems to generate wrong function signature for array arguments

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

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

評価

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

調査の方向性

まず、OCCT HLRAlgo::InitMinMax の宣言と、生成された OCP.HLRAlgo.HLRAlgo.InitMinMax_s シグネチャを比較します。配列引数のバインディング生成パスを調査し、このエントリーポイントを使ってクラッシュを再現します。配列引数が正しくサポートされるか、生成された関数が無効なシグネチャを受け入れずに安全に拒否すれば完了です。

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

説明

OCP seems to generate wrong function signature for array arguments.

For example, OCCT has:

void HLRAlgo::InitMinMax (const Standard_Real Big, Standard_Real Min[16], Standard_Real Max[16])

But OCP lists OCP.HLRAlgo.HLRAlgo.InitMinMax_s() as:

TypeError: InitMinMax_s(): incompatible function arguments. The following argument types are supported:
    1. (Big: float, Min: float, Max: float) -> None

Of course, if you actually try calling it with just float, it crashes:

>>> from OCP.HLRAlgo import HLRAlgo
>>> HLRAlgo.InitMinMax_s(0., 0., 0.)
*** stack smashing detected ***: terminated
Aborted

I'm not sure if there are any array-argument-taking functions which are likely to be used by anyone (I was only trying to use the MinMax things in HLR to verify I've understood some code correctly, not for actual work); Grepping does indicate that they are used at least in a few other places, but I don't know if those are things that anyone is likely to want to use.

What I'm saying is, I'm not sure if this is "worth" fixing properly (ie. adding support for array arguments), and how hard that would be to do - but if it's decided that it's not worth fixing properly, maybe the functions could at least be made to raise an error when called, instead of actually allowing the call with the wrong signature to go through and crash the program?

主要言語
C++
スター
203
フォーク
50
平均マージ
3日 4時間
マージ済み PR(30日)
1

環境構築

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

はじめの一歩

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

CadQuery/OCP のほかの issue

CadQuery/OCP の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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