-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GaitGenerator.cppでメモリアクセス違反 #1154
Comments
ありがとうございます、確認します。 |
AddressSanitizerという機能で検出しました。 |
ありがごとうございます、参考になります。 |
度々すいません、AddressSanitizer(とclang)でhrpsys-baseをビルドするときはどのようにされてますか? |
CMAKE_CXX_FLAGS_XXやCMAKE_C_FLAGS_XXに手動で-fsanitize=addressを追加しています。 |
ありがとうございます、習性前はエラーがでて、習性後にでないことを確認しました。 |
#1159 |
ありがとうございます。 |
すごいですね.これ.知りませんでした. |
@ban-masa @future731 これです. |
@k-okada |
そうでした.これも実行しないとダメですね. 以下の方法に加えて,
|
hrpsysをAddressSanitizer付きでbuildしてシミュレータ上で試そうと思ったのですが、AddressSanitizer付きだとChoreonoidが使えないということに気がついたので報告しておきます。 今回の自分の気づいたバグの発生環境はハンドに力を与える必要があったため、インタラクティブに力を与えられるChoreonoidを使おうとしたのですが、どうもhrpsysの生成するdllがdlopenできなくなり正常に動作しないようです。(dllを使わないhrpsys-simulatorは大丈夫でした) |
rtcだけをためすのであれば,hrpsys-simulator
で:angle-vector送れば状況は再現できると理解しているんだけど,それでいいよね.
…--
◉ Kei Okada
2018年11月8日(木) 17:22 Bando Masahiro <[email protected]>:
hrpsysをAddressSanitizer付きでbuildしてシミュレータ上で試そうと思ったのですが、AddressSanitizer付きだとChoreonoidが使えないということに気がついたので報告しておきます。
今回の自分の気づいたバグの発生環境はハンドに力を与える必要があったため、インタラクティブに力を与えられるChoreonoidを使おうとしたのですが、どうもhrpsysの生成するdllがdlopenできなくなり正常に動作しないようです。(dllを使わないhrpsys-simulatorは大丈夫でした)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1154 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAeG3D1n__4VI2xM0rMUW8GyRIl3wjzjks5us-nAgaJpZM4N9E8i>
.
|
@ban-masa 結果らしいものがでたようです↓ 見方がよくわからないけど,変更したコード部分はここに入っているのかな? |
岡田先生 今回問題にしていた部分は hrpsys-base/rtc/Stabilizer/ZMPDistributor.h Lines 134 to 141 in 7263626
の部分で、csとvsのサイズが違うと配列外アクセスをするというものでした。 vsを四脚分正しく設定すれば防げるのですが、vsとcsのサイズの違いをチェックする仕様にはなっていないので気づかずにセグフォを起こしてしまいました。 coverity scanの方で該当部分をチェックしてみましたが、残念ながら検出されてはいないようです。 |
@snozawa さん、
testGaitGenerator --test0
とすると、
https://github.com/fkanehiro/hrpsys-base/blob/master/rtc/AutoBalancer/GaitGenerator.cpp#L213
で、step_count_listの長さが6であるのに対して、6以上のインデックスでのアクセスが行われるようです。
The text was updated successfully, but these errors were encountered: