Commit 0f86d1e
runtime: use set_thread_area instead of modify_ldt on linux/386
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: I0cc5139e40e9e5591945164156a77b6bdff2c7f1
Reviewed-on: https://go-review.googlesource.com/21190
Reviewed-by: Austin Clements <[email protected]>
Reviewed-by: Minux Ma <[email protected]>1 parent 2326c24 commit 0f86d1e
1 file changed
+30
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
409 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
410 | 420 | | |
411 | | - | |
412 | 421 | | |
413 | 422 | | |
414 | 423 | | |
| |||
437 | 446 | | |
438 | 447 | | |
439 | 448 | | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
440 | 452 | | |
441 | 453 | | |
442 | | - | |
443 | | - | |
444 | | - | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
445 | 457 | | |
446 | 458 | | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
452 | 462 | | |
453 | 463 | | |
454 | 464 | | |
| |||
457 | 467 | | |
458 | 468 | | |
459 | 469 | | |
460 | | - | |
461 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
462 | 480 | | |
463 | | - | |
| 481 | + | |
464 | 482 | | |
465 | 483 | | |
466 | 484 | | |
| |||
0 commit comments