-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Disable ASLR linker option for MinGW-w64 (64-bit) #745
Conversation
うーむ、テストでエラーになってしまった。。。 |
そもそもASLRでこけること自体がおかしいので、根本的なところを直さないとだめかも。 |
(1) 最新の MSYS2/MinGW-w64 (64-bit) 環境で、以下のエラーが出る gosh.exe ができてしまう。 (2) リンカ (ld) に ( https://www.msys2.org/news/#2021-01-31-aslr-enabled-by-default このあたりに、関連情報あり? (英語がよく分からず) msys2/MINGW-packages#7023 msys2/MINGW-packages#6986 (3) 古い MSYS2/MinGW-w64 (64-bit) 環境では、上記フラグを指定すると、今度は以下のエラーが出る。 (4) Gauche のビルドで、リンカにフラグを渡すためには、現状、複数の変数を設定する必要がある。
|
調査ありがとうございます。これは貴重な情報。 |
原因が分かったようなので、一度閉じます。 |
最近、GitHub Actions のワークフローで、Windows 64-bit (x86_64) のジョブが、
エラー終了するようになりました。
どうも、MSYS2 の更新で、リンカの ASLR の機能がデフォルトで ON になったらしく、
それがトリガーになっているようです。
https://www.msys2.org/news/#2021-01-31-aslr-enabled-by-default
(しかし、Windows 32-bit (i686) のジョブの方は、エラーになりませんが。。。)
まずは、64-bit 環境の場合に、リンカのオプションで ASLR 機能を無効にするようにしました。
これらのオプションが、古い開発環境でエラーにならないかどうかも、少し気になりますが。。。
<テスト結果>
https://github.com/Hamayama/Gauche/actions/runs/548056283