boostorg / boostorg/geometry

boost::geometry union & difference &r-tree error

オープン
#653 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
517
フォーク
232
PR マージ指標
30日以内にマージされた PR はありません

説明

I want to "union" or "clipper" two rectangle but I always get the wrong output.
so I used "fsanitize=undefined" command to check my code, and it report a overflow error.
I think the all points of the tow rectangle in the integer range,so my question is if the points range
will be "long long" How do I define the type of point_xy to make sure it doesn't overflow when I used the function "union_" "difference" , and some time I used boost r-tree will also get the error.
![boost1](https://user-images.githubusercontent.com/50729390/57905892-afc1d500-78aa-11e9-86bf-bc84b302d215.PNG)
![boost2](https://user-images.githubusercontent.com/50729390/57905900-b2242f00-78aa-11e9-9952-10c69886083f.PNG)
![boost3](https://user-images.githubusercontent.com/50729390/57905902-b5b7b600-78aa-11e9-9d3c-3ecd414d2782.PNG)

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、矩形の座標と point_xy 型を使って sanitizer のレポートを再現し、次に issue で言及されている union_、difference、r-tree の使用箇所を調査します。最小限の再現ケースによって、overflow と誤った出力の原因がライブラリにあるのか、呼び出し側の型/範囲処理にあるのかを判定し、サポートされる型または修正方法を特定できれば完了です。

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

評価

技術スタック
cpp
領域
computer-graphics
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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