Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime: use set_thread_area instead of modify_ldt on linux/386
This is a cherry-pick of https://go-review.googlesource.com/21190 to release-branch-go1.4. Diff prepared by Ian Lance Taylor. linux/386 depends on modify_ldt system call, but recent Linux kernels can disable this system call. Any Go programs built as linux/386 crash with the message 'Trace/breakpoint trap'. The kernel config CONFIG_MODIFY_LDT_SYSCALL, which control enable/disable modify_ldt, is disabled on Amazon Linux 2016.03. This fixes this problem by using set_thread_area instead of modify_ldt on linux/386. Fixes golang#14795. Change-Id: I22a67d6119e5d24afaa01e2c2b8174991a8a9bf4 Reviewed-on: https://go-review.googlesource.com/31753 Reviewed-by: Brad Fitzpatrick <[email protected]>
- Loading branch information