--- Log opened Mon Jun 07 00:00:31 2021 01:13 -!- nsh [~lol@5.135.157.17] has quit [Ping timeout: 244 seconds] 01:17 -!- belcher_ is now known as belcher 02:12 -!- waxwing [~waxwing@user/waxwing] has quit [Quit: ZNC 1.7.4+deb0+bionic0 - https://znc.in] 02:12 -!- waxwing [~waxwing@193.29.57.116] has joined #secp256k1 05:00 -!- waxwing [~waxwing@193.29.57.116] has quit [Changing host] 05:00 -!- waxwing [~waxwing@user/waxwing] has joined #secp256k1 07:31 -!- meshcollider [meshcollid@user/meshcollider] has quit [Remote host closed the connection] 07:50 -!- meshcollider [meshcollid@jujube.ircnow.org] has joined #secp256k1 11:01 < BlueMatt> funnnn got a gcc miscompilation on ppcel64 11:01 < BlueMatt> https://github.com/bitcoin-core/secp256k1/issues/949 11:03 < roconnor> is gcc allow to know that a src = dst memcpy is okay? 11:03 < roconnor> that seems ... dubious. 11:03 < BlueMatt> I would be astounded if it were 11:04 < BlueMatt> I assume that valgrind is only aware of it being a memcpy *because* its calling out to libc 11:04 < BlueMatt> but its possible gcc is doing some internal memcpy that doesn't assume they're distinct and valgrind discovers that somehow 11:04 < BlueMatt> probably this is fixed at -O2 but shouldnt be broken at -O0 either 11:05 < sipa> libsecp256k1 doesn't have any explicit memcmps anymore, i think? 11:05 < BlueMatt> gcc is inserting one for you 11:05 < BlueMatt> to be "helpful" 11:05 < gmaxwell> sooo not the first time this has happened, in the past GCC developers have fixed them, and clang developers refuses to fix them. 11:05 < sipa> yeah, it's compiling a comparison to a memcmp 11:05 < sipa> gmaxwell: but this is gcc 11:05 < BlueMatt> let me double-check that 11:06 < BlueMatt> its possible its clang, but I *thought* it should be running gcc 11:06 < sipa> if it's clang, it's well known :) 11:06 < gmaxwell> roconnor: claing developers say that they're the compiler they can do what they want, other people point out "you may be the compiler but you don't write the libc" but they don't care. 11:06 < gmaxwell> clang* 11:06 < BlueMatt> gmaxwell: that's....wtf? I mean if they were calling their own internal memcpy then sure, but.....? 11:07 < gmaxwell> BlueMatt: well on osx they write the libc.... soooo. 11:07 < BlueMatt> but.... 11:07 < BlueMatt> I mean how much of clang is maintained by apple anymore? 11:07 < gmaxwell> and yeah, it would indeed be perfectly safe if they called their own internal guarenteed to support that kind of overlap memcpy. 11:09 < BlueMatt> yea, def compiled with gcc 11:09 < gmaxwell> and are you on PPC by any chance? 11:09 < BlueMatt> yes 11:09 < BlueMatt> this is ppcel64 11:09 < BlueMatt> the C part, that is, its later linked with llvm into a .a then further linked with gcc into an actual binary 11:09 < BlueMatt> but its all -O0 and no lto or anything crazy like that 11:10 < gmaxwell> GCC was still doing that more recently on ppc than on x86_64, at least with non-standard optimizer settings. 11:11 < gmaxwell> IIRC it also violates constant timeness on PPC with weirdo optimizer settings, so maybe best to not do that? :P 11:11 < sipa> can you reproduce it by just compiling libsecp256k1 and its test on their own, and running those in valgrind? 11:12 < BlueMatt> there's no crazy optimizer settings here, its -O0 11:13 < BlueMatt> gmaxwell: this is also gcc 10.2, so its not like its some old gcc 11:14 < BlueMatt> sipa: plz2commandstring 11:15 < sipa> ? 11:15 < sipa> git clone, make, valgrind ./tests ? 11:15 < sipa> + configure :) 11:20 < BlueMatt> sipa: yes, identical error directly 11:20 < BlueMatt> tests.c:6488 at the top of the stack, ec_pubkey_negate calling ge_neg 11:23 < sipa> is that -O0? 11:23 < BlueMatt> no, the default, which looks like -O2? 11:24 < sipa> YEAH 11:25 < BlueMatt> BOOOOOO 11:26 < sipa> oops, caps 11:27 < sipa> can you reproduce with -O0 as well? 11:28 < BlueMatt> assuming the later -O0 from CFLAGS=O0 configure overrides, then, yes, I can 11:31 < sipa> und den callstack? 11:31 < BlueMatt> same as above 11:31 < BlueMatt> but without the line numbers cause gcc hates me 11:51 -!- kaushik47 [~kaushik@2401:4900:3a05:69b4:59ee:ba72:cd7:95d1] has joined #secp256k1 11:52 -!- kaushik47 [~kaushik@2401:4900:3a05:69b4:59ee:ba72:cd7:95d1] has quit [Client Quit] 12:37 < real_or_random> sipa: wait, why are you switching to German randomly :D 12:37 * BlueMatt literally didnt even notice 12:51 < real_or_random> :) 12:55 < sipa> it happens 13:53 -!- meshcollider [meshcollid@jujube.ircnow.org] has quit [Changing host] 13:53 -!- meshcollider [meshcollid@user/meshcollider] has joined #secp256k1 14:08 -!- ajonas [sid385278@id-385278.brockwell.irccloud.com] has joined #secp256k1 14:37 -!- lukedashjr [~luke-jr@user/luke-jr] has joined #secp256k1 14:40 -!- luke-jr [~luke-jr@user/luke-jr] has quit [Ping timeout: 244 seconds] 14:40 -!- lukedashjr is now known as luke-jr 15:28 < sipa> real_or_random: yesterday i was talking to steven roose, and somewhere halfway the conversation we both switched to english, without noticing until several minutes later 16:14 < gmaxwell> The most fun thing about being an english speaker is that you can go to a party with people from NL and then simply walk from group to group causing each group to switch to english, until the whole party is speaking english. :P 16:16 < sipa> i've had this happen, but i'm sure it also works for DE speakers or several skandinavian countries 18:27 -!- luke-jr [~luke-jr@user/luke-jr] has quit [Quit: ZNC - http://znc.sourceforge.net] 18:28 -!- luke-jr [~luke-jr@user/luke-jr] has joined #secp256k1 19:01 -!- luke-jr [~luke-jr@user/luke-jr] has quit [Quit: ZNC - http://znc.sourceforge.net] 19:06 -!- luke-jr [~luke-jr@user/luke-jr] has joined #secp256k1 21:36 -!- belcher [~belcher@user/belcher] has quit [Ping timeout: 264 seconds] 21:49 -!- belcher [~belcher@user/belcher] has joined #secp256k1 --- Log closed Tue Jun 08 00:00:32 2021