github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
Geth MoarVM: MasterDuke17++ created pull request #1233:
Use new functions introduced in ltm v1.2.0...
14:31
MasterDuke hm. github.com/MoarVM/MoarVM/pull/1233 is failing because "mp_set_double implementation is only available on platforms with IEEE754 floating point format". however, it appears we're assuming IEEE754 anyway according to github.com/MoarVM/MoarVM/pull/1233...758e807L58 17:43
i can always just back out the part of the change that uses mp_set_double(), but are we still susceptible to problems in our custom code? 17:44
MasterDuke isn't this dangerous? github.com/MoarVM/MoarVM/blob/mast...#L974-L976 20:32
shouldn't we be using mp_init_copy()? otherwise we're just copying the mp_int, not the stuff that may be inside it? 20:33
timotimo MasterDuke: it doesn't get mp_copy'd here because the body would otherwise disappear when the function is left, due to being put onto the stack 21:23
i'm not sure why alloca is used here, i think it could just be "mp_int i" and use &i whenever it's mentioned 21:24
i think there's also an mp_clear missing before the second exception throw there
MasterDuke re mp_clear, yeah, i have a new commit i'm just about to push that adds mp_clears everywhere where missing 22:11
timotimo: but then shouldn't it be mp_copy+memcpy? 22:14
wait. you mean the MVMP6bigintBody *body would disappear? 22:26
i'm thinking the else block should be: mp_int *i_cpy = MVM_malloc(sizeof(mp_int)); mp_init_copy(i_cpy, i); body->u.bigint = i_cpy; 22:29