[all-commits] [llvm/llvm-project] 59d60d: [lldb][test] Avoid a 3-argument main in test infer...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Thu Jun 18 14:50:17 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 59d60d096048d37ff62b259eca71ac6cf1463845
      https://github.com/llvm/llvm-project/commit/59d60d096048d37ff62b259eca71ac6cf1463845
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2026-06-18 (Thu, 18 Jun 2026)

  Changed paths:
    M lldb/test/API/commands/frame/diagnose/inheritance/main.cpp
    M lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
    M lldb/test/API/functionalities/plugins/python_os_plugin/main.c
    M lldb/test/API/lang/cpp/extern_c/main.cpp
    M lldb/test/API/lang/cpp/unique-types/main.cpp
    M lldb/test/API/python_api/sbvalue_const_addrof/main.cpp
    M lldb/test/API/python_api/sbvalue_unsigned_enum_bitfield_value/main.cpp
    M lldb/test/API/python_api/target/main.c
    M lldb/test/API/tools/lldb-dap/launch/main.c
    M lldb/test/API/tools/lldb-dap/restart/main.c

  Log Message:
  -----------
  [lldb][test] Avoid a 3-argument main in test inferiors (#204656)

On WebAssembly clang only wires a 0- or 2-argument main to the program
entry point: EmitMainVoidAlias emits the __main_void alias for a
no-argument main, and the 2-argument form is mangled to
__main_argc_argv.

A 3-argument main(argc, argv, envp) matches neither, so main is never
connected to the entry point and is left as an undefined-weak stub whose
body is `unreachable`. The affected inferiors trap with "Exception:
unreachable" before reaching main (even when run outside the debugger)
so any test using them fails on wasm.

Drop the unused third parameter, and where the environment is actually
iterated read it from `environ` instead. The inferiors now run on
WebAssembly and behave identically on other platforms.



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