Commit 09b43b77 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder
Browse files

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 #14795.

Change-Id: I22a67d6119e5d24afaa01e2c2b8174991a8a9bf4
Reviewed-on: https://go-review.googlesource.com/31753


Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 91855792
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment