<div dir="auto">Hi Tim,<div dir="auto">Thanks for your answer. I'll fix the problem with envp now.</div><div dir="auto"><br></div><div dir="auto">I don't know if you have seen my other question but i was doubting of that code because I cannot get the proper value of argv at runtime using my Interpreter. I hope this is the problem. Do you think the same?</div><div dir="auto"><br></div><div dir="auto">Thanks again</div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Jan 26, 2019, 08:22 Tim Northover <<a href="mailto:t.p.northover@gmail.com">t.p.northover@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, 26 Jan 2019 at 07:44, Alberto Barbaro via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a>> wrote:<br>
>     const char* const* envp;<br>
>     [...]<br>
>     v->runFunctionAsMain(main, parameters, envp);<br>
<br>
envp remains uninitialized here, and runFunctionAsMain appears to<br>
iterate through it until it reaches a nullptr, so that'll probably<br>
crash. I think you want<br>
<br>
  const char* const* envp = {nullptr};<br>
<br>
Other than that, it looked sensible to me.<br>
<br>
Cheers.<br>
<br>
Tim.<br>
</blockquote></div>