[llvm-dev] How to pass arbitrary arguments to runFunctionAsMain?
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Sat Jan 26 00:21:50 PST 2019
On Sat, 26 Jan 2019 at 07:44, Alberto Barbaro via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> const char* const* envp;
> [...]
> v->runFunctionAsMain(main, parameters, envp);
envp remains uninitialized here, and runFunctionAsMain appears to
iterate through it until it reaches a nullptr, so that'll probably
crash. I think you want
const char* const* envp = {nullptr};
Other than that, it looked sensible to me.
Cheers.
Tim.
More information about the llvm-dev
mailing list