--- Log opened Tue Dec 10 00:00:33 2019 00:28 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has quit [Quit: ZNC - http://znc.sourceforge.net] 00:29 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has joined #secp256k1 00:30 -!- ddustin [~ddustin@unaffiliated/ddustin] has joined #secp256k1 00:35 -!- ddustin [~ddustin@unaffiliated/ddustin] has quit [Ping timeout: 250 seconds] 00:42 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has quit [Remote host closed the connection] 00:44 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has joined #secp256k1 02:22 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has quit [Ping timeout: 252 seconds] 02:37 -!- midnight [~midnightm@unaffiliated/midnightmagic] has quit [Ping timeout: 248 seconds] 02:44 -!- midnightmagic [~midnightm@unaffiliated/midnightmagic] has joined #secp256k1 02:50 -!- midnightmagic is now known as midnight 02:58 -!- jonatack [~jon@213.152.161.35] has joined #secp256k1 03:11 -!- jonatack [~jon@213.152.161.35] has quit [Ping timeout: 240 seconds] 03:16 -!- belcher [~belcher@unaffiliated/belcher] has quit [Ping timeout: 245 seconds] 03:19 -!- jonatack [~jon@54.76.13.109.rev.sfr.net] has joined #secp256k1 03:22 -!- belcher [~belcher@unaffiliated/belcher] has joined #secp256k1 06:18 -!- jonatack [~jon@54.76.13.109.rev.sfr.net] has quit [Ping timeout: 268 seconds] 06:20 -!- andytoshi [~apoelstra@unaffiliated/andytoshi] has joined #secp256k1 06:55 < elichai2> something makes no sense with valgrind, I have `secp256k1_gej *target` and I run ` VG_CHECK(&target->x, sizeof(target->x)); VG_CHECK(&target->y, sizeof(target->y)); VG_CHECK(&target->z, sizeof(target->z)); VG_CHECK(&target->infinity, sizeof(target->infinity)); VG_CHECK(target, sizeof(*target));` and somehow the last one fails. `Uninitialised byte(s) found during client check request` 06:55 < elichai2> How can this be? how can all the fields in the struct be intialized but the whole struct isn't? does it check padding to for some stupid reason? 07:22 < andytoshi> how could a check of `sizeof(*target)` starting at `target` **not** check padding? 07:23 < andytoshi> i'm curious what you're trying to do here 07:24 < andytoshi> strictly speaking, in C there is no way to meaningfully initialize padding. the bytes are always allowed to change out from under you, even between reads 07:25 < andytoshi> but in practice you can memset them, because this is needed for a ton of POSIX APIs to make sense 07:29 < andytoshi> in libsecp we don't do any posixy stuff like casting between pointers to different structs. the padding bytes should never matter. 07:30 < elichai2> andytoshi: trying to debug a valgrind error, so I used the valgrind check macro. And I guess you're right. So what's the best way to check if a variable is initialized or not? (for debugging purposes) 07:33 -!- instagibbs [~instagibb@pool-71-178-191-230.washdc.fios.verizon.net] has quit [Ping timeout: 265 seconds] 07:39 -!- instagibbs [~instagibb@pool-71-178-191-230.washdc.fios.verizon.net] has joined #secp256k1 07:43 < elichai2> I think I know what the problem is. I assumed `secp256k1_gej_add_ge_var` always intializes the value and I didn't check for infinity before normalizing the field elements. but there's a branch in `secp256k1_gej_add_ge_var` that sets infinity to 1 and returns. without touching the field elements 07:44 < elichai2> *what my problem is :) 08:16 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has joined #secp256k1 09:22 < andytoshi> elichai2: not that it's much of an excuse, but fwiw this is something of a rite of passage writing libsecp unit tests 09:22 < andytoshi> that whenever you use the internal API functions you wind up needing to memset things to avoid valgrind "jump on uninitialized value" errors 09:22 < elichai2> andytoshi: that you must check for infinity before accessing fe? 09:22 < elichai2> oh yeah that makes sense 09:23 < elichai2> *some sense :) 12:25 -!- sanket1729 [~sanket172@72.36.89.11] has quit [Ping timeout: 250 seconds] 12:29 -!- sanket1729 [~sanket172@72.36.89.11] has joined #secp256k1 13:13 -!- andytoshi [~apoelstra@unaffiliated/andytoshi] has quit [Ping timeout: 265 seconds] 13:26 -!- ddustin [~ddustin@unaffiliated/ddustin] has joined #secp256k1 13:40 -!- ddustin [~ddustin@unaffiliated/ddustin] has quit [Remote host closed the connection] 13:41 -!- ddustin [~ddustin@unaffiliated/ddustin] has joined #secp256k1 13:45 -!- ddustin [~ddustin@unaffiliated/ddustin] has quit [Ping timeout: 240 seconds] 13:58 -!- ddustin [~ddustin@unaffiliated/ddustin] has joined #secp256k1 14:47 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has quit [Remote host closed the connection] 14:48 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has joined #secp256k1 15:03 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has quit [Ping timeout: 268 seconds] 15:13 -!- ddustin [~ddustin@unaffiliated/ddustin] has quit [Remote host closed the connection] 15:14 -!- ddustin [~ddustin@unaffiliated/ddustin] has joined #secp256k1 15:18 -!- ddustin [~ddustin@unaffiliated/ddustin] has quit [Ping timeout: 245 seconds] 15:44 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has joined #secp256k1 16:03 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has quit [Ping timeout: 240 seconds] 16:06 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has joined #secp256k1 16:34 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has quit [Ping timeout: 268 seconds] 16:39 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has joined #secp256k1 16:40 -!- ddustin [~ddustin@unaffiliated/ddustin] has joined #secp256k1 16:40 -!- ddustin [~ddustin@unaffiliated/ddustin] has quit [Remote host closed the connection] 16:52 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has quit [Ping timeout: 240 seconds] 17:06 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has joined #secp256k1 17:11 -!- ddustin [~ddustin@unaffiliated/ddustin] has joined #secp256k1 17:14 -!- ddustin [~ddustin@unaffiliated/ddustin] has quit [Remote host closed the connection] 17:14 -!- ddustin [~ddustin@unaffiliated/ddustin] has joined #secp256k1 17:18 -!- ddustin [~ddustin@unaffiliated/ddustin] has quit [Ping timeout: 240 seconds] 18:30 -!- ddustin [~ddustin@unaffiliated/ddustin] has joined #secp256k1 18:41 -!- ddustin [~ddustin@unaffiliated/ddustin] has quit [Remote host closed the connection] 18:42 -!- ddustin [~ddustin@unaffiliated/ddustin] has joined #secp256k1 18:46 -!- ddustin [~ddustin@unaffiliated/ddustin] has quit [Ping timeout: 268 seconds] 22:31 -!- ddustin [~ddustin@unaffiliated/ddustin] has joined #secp256k1 22:37 -!- ddustin [~ddustin@unaffiliated/ddustin] has quit [Remote host closed the connection] 22:37 -!- ddustin [~ddustin@unaffiliated/ddustin] has joined #secp256k1 23:08 -!- ddustin [~ddustin@unaffiliated/ddustin] has quit [Remote host closed the connection] 23:09 -!- ddustin [~ddustin@unaffiliated/ddustin] has joined #secp256k1 23:13 -!- ddustin [~ddustin@unaffiliated/ddustin] has quit [Ping timeout: 240 seconds] 23:28 -!- ddustin [~ddustin@unaffiliated/ddustin] has joined #secp256k1 23:32 -!- ddustin [~ddustin@unaffiliated/ddustin] has quit [Ping timeout: 265 seconds] 23:59 -!- ddustin [~ddustin@unaffiliated/ddustin] has joined #secp256k1 --- Log closed Wed Dec 11 00:00:33 2019