Re: [Myjit-devel] Edge case `jit_free` segfault
Status: Beta
Brought to you by:
pkrajca
From: Petr K. <pet...@up...> - 2016-09-25 15:52:25
|
Hello Adam, On Sun, 25 Sep 2016 14:29:28 +0200, Adam Cimarosti <cim...@gm...> wrote: > This could very well be incorrect usage on my part. > * Specifically, I am using the same `jit` object to generate two functions. It hasn't given me issues with different code, so I assume it's supported. It is perfectly correct to generate two function using single `jit` object. However, you must call jit_generate_code(p) only once. Hence, you have to move lines jit_check_code(p, JIT_WARN_ALL); jit_generate_code(p); into the main-function. > * I am also returning 0 for a function with void return type, I assume this is the correct thing to do (rather than skipping the return >altogether). Yes, it's correct, you have to return something. Best regards, Petr |