[crosstool-ng/crosstool-ng] c41b96: package/gcc: fix xtensa PR target/65416

Alexey Neyman stilor@att.net
Sun Sep 23 18:36:00 GMT 2018


  Branch: refs/heads/master
  Home:   https://github.com/crosstool-ng/crosstool-ng
  Commit: c41b9641b1eed68819cc6f174eb7319a6fca5ffc
      https://github.com/crosstool-ng/crosstool-ng/commit/c41b9641b1eed68819cc6f174eb7319a6fca5ffc
  Author: Max Filippov <jcmvbkbc@gmail.com>
  Date:   2018-06-24 (Sun, 24 Jun 2018)

  Changed paths:
    A packages/gcc/5.5.0/0034-xtensa-fix-PR-target-65416.patch
    A packages/gcc/6.4.0/0034-xtensa-fix-PR-target-65416.patch
    A packages/gcc/7.3.0/0022-xtensa-fix-PR-target-65416.patch
    A packages/gcc/8.1.0/0021-xtensa-fix-PR-target-65416.patch

  Log Message:
  -----------
  package/gcc: fix xtensa PR target/65416

gcc-8.1 for xtensa miscompiles uClibc dynamic linker due to gcc PR
target/65416. The build completes successfully, but the binary is
non-functional because the following fragment in the _dl_get_ready_to_run
in ld-uClibc.so overwrites register spill area on stack causing register
corruption in the previous call frame and a subsequent crash:

    419f:       f0c1b2          addi    a11, a1, -16
    41a2:       1ba9            s32i.n  a10, a11, 4
    41a4:       0bc9            s32i.n  a12, a11, 0
    41a6:       5127f2          l32i    a15, a7, 0x144
    41a9:       1765b2          s32i    a11, a5, 92
    41ac:       4e2782          l32i    a8, a7, 0x138
    41af:       146af2          s32i    a15, a10, 80
    41b2:       001b10          movsp   a1, a11

The crash terminates the init process and causes kernel panic.
The fix prevents reordering of movsp opcode and any access to the stack
frame memory and is applicable to all existing gcc versions.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>


  Commit: 8026e6a0139b3f3a4c416c131885d18b8908bf2c
      https://github.com/crosstool-ng/crosstool-ng/commit/8026e6a0139b3f3a4c416c131885d18b8908bf2c
  Author: Alexey Neyman <stilor@att.net>
  Date:   2018-09-23 (Sun, 23 Sep 2018)

  Changed paths:
    A packages/gcc/5.5.0/0034-xtensa-fix-PR-target-65416.patch
    A packages/gcc/6.4.0/0034-xtensa-fix-PR-target-65416.patch
    A packages/gcc/7.3.0/0022-xtensa-fix-PR-target-65416.patch
    A packages/gcc/8.1.0/0021-xtensa-fix-PR-target-65416.patch

  Log Message:
  -----------
  Merge pull request #994 from jcmvbkbc/xtensa-fix-pr65416

package/gcc: fix xtensa PR target/65416


Compare: https://github.com/crosstool-ng/crosstool-ng/compare/af079341393f...8026e6a0139b
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the crossgcc mailing list