Thanks for the info.

I believe that Windows generally requires that user opt-in (set in the exe) for 
DEP and ASLR.  However, it seems that Go exe's for Windows don't have the DEP 
opt-in set.

Worth opening some issues?

John

    John Souvestre - New Orleans LA


-----Original Message-----
From: Ian Lance Taylor [mailto:i...@golang.org] 
Sent: 2017 October 04, Wed 15:27
To: John Souvestre
Cc: golang-nuts
Subject: Re: [go-nuts] Memory Safety

On Wed, Oct 4, 2017 at 1:07 PM, John Souvestre <j...@souvestre.com> wrote:
>
> Does Go provide Data Execution Prevention (DEP) and Address space layout
> randomization (ASLR)?

Go does not prevent the operating system from implementing Data
Execution Prevention.  If the OS implements it, it will apply to Go
programs as it does to programs written in any other language.

Go supports ASLR on GNU/Linux systems by passing -buildmode=pie to `go
build` or `go install`.  -buildmode=pie is currently supported on
GNU/Linux and Android systems.  Since the 1.9 release support was
added for Darwin amd64.  It should be straightforward to add support
for other Unix systems, if anybody wants to do that.  I don't know
what would be involved in adding support for Windows.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to