[all-commits] [llvm/llvm-project] 2e83a0: [asan] Fixed a runtime crash.

kstoimenov via All-commits all-commits at lists.llvm.org
Thu Aug 26 13:31:17 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e83a0efb9065fdc526b92cfe0f89ca53ca547d7
      https://github.com/llvm/llvm-project/commit/2e83a0efb9065fdc526b92cfe0f89ca53ca547d7
  Author: Kirill Stoimenov <kstoimenov at google.com>
  Date:   2021-08-26 (Thu, 26 Aug 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86MCInstLower.cpp

  Log Message:
  -----------
  [asan] Fixed a runtime crash.

Looks like the NoRegister has some effect on the final code that is generated. My guess is that some optimization kicks in at the end?

When I use -S to dump the assembly I get the correct version with 'shrq    $3, %r8':
        movq    %r9, %r8
        shrq    $3, %r8
        movsbl  2147450880(%r8), %r8d

But, when I disassemble the final binary I get RAX in stead of R8:
        mov    %r9,%r8
        shr    $0x3,%rax
        movsbl 0x7fff8000(%r8),%r8d

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D108745




More information about the All-commits mailing list