Skip to content

Use Windows SecurityCookie instead of libssp (or mingw crt)? #511

@Andarwinux

Description

@Andarwinux

Hi,
Currently, when using -fstack-protector with mingw clang, it will link to libssp and libssp_nonshared, even though SSP is already implemented in mingw crt. llvm-mingw seems to generate empty .a files to fix this, but toolchains built in other ways do not do this, and results in stack protector not being ready to use out of the box.

Additionally, if set MajorSubsystemVersion to 10, exe will fail to run because mingw does not support SecurityCookie.

I noticed that mingw used to have something related to SecurityCookie, but it was later removed (because it was incomplete ?). Perhaps consider re-add a complete SecurityCookie implementation to allow using SecurityCookie instead of ssp. This way, clang can expose a new option to use SecurityCookie without linking to libssp (because it's new), and it can allow exe compatible with major-subsystem-version=10.

https://bugreports-test.qt.io/projects/QBS/issues/QBS-1724

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions