[all-commits] [llvm/llvm-project] 71ccd0: [IRInterpreter] Return zero address for missing we...

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu May 30 23:18:56 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 71ccd0d8ccf876e32e21514839195f159642fe4c
      https://github.com/llvm/llvm-project/commit/71ccd0d8ccf876e32e21514839195f159642fe4c
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-05-31 (Fri, 31 May 2024)

  Changed paths:
    M lldb/source/Expression/IRInterpreter.cpp

  Log Message:
  -----------
  [IRInterpreter] Return zero address for missing weak function (#93548)

If a weak function is missing, still return it's address (zero) rather
than failing interpretation. Otherwise we have a mismatch between
Interpret() and CanInterpret() resulting in failures that would not
occur with JIT execution.

Alternatively, we could try to look for weak symbols in CanInterpret()
and generally reject them there.

This is the root cause for the issue exposed by
https://github.com/llvm/llvm-project/pull/92885. Previously, the case
affected by that always fell back to JIT because an icmp constant
expression was used, which is not supported by the interpreter. Now a
normal icmp instruction is used, which is supported. However, we fail to
interpret due to incorrect handling of weak function addresses.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list