[swift-dev] Standard shared libraries with executable stack

Sangjin Han tinysun.net at gmail.com
Fri Jun 17 01:39:32 CDT 2016


Hi, Kim.

The test result is same on WSL build 14342.

There is similar report in
https://github.com/Microsoft/BashOnWindows/issues/286 .
MS engineer recognized this and replied that give them feedback on the
uservoice for prioritizing, currently it has only 3 votes.

-Han Sangjin

2016-06-16 21:17 GMT+09:00 Jongsu Kim via swift-dev <swift-dev at swift.org>:

> Hi,
>
> This could have been caused by our switch from the BFD linker to gold.
>> Could you try linking a hello world program using gold linker and
>> running it in WSL?
>>
>
> I tried to build Swift by not using -fuse-gold option and the result was
> same.
>
>
> Are you sure that PROT_GROWSDOWN is the flag that enables executable
>> stack?  I thought that's what PROT_EXEC is for.  I'm not sure what
>> PROT_GROWSDOWN actually changes, if I were to speculate, I'd say it
>> could be a marker that means "this is a stack" or maybe even be just a
>> performance hint.
>>
>
> You are right. The executable stack is enabled by PROT_EXEC.
>
> But Swift shared library's executable stack seems to set PROT_EXEC AND
> PROT_GROWSDOWN according to strace.
>
> I don't know what causes Swift shared library to have executable stack
> since Febrary 25 snapshot. Febrary 8 snapshot and Swift 2.X branches have
> no such executable stack shared library.
>
> Thanks,
>
>
> -Kim, Jongsu
>
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160617/0fae62ba/attachment.html>


More information about the swift-dev mailing list