00:32 -!- Pinkbeast has quit [*.net *.split] 01:09 -!- Pinkbeast has joined #evilhack 01:54 -!- cbus has quit [Ping timeout: 260 seconds] 01:54 -!- cbus has joined #evilhack 01:02 -!- bouquet has joined #evilhack 02:34 -!- hackemslashem has joined #evilhack 02:53 -!- Umbire has joined #evilhack 03:28 -!- elenmirie has joined #evilhack 03:56 -!- Umbire has quit [Remote host closed the connection] 03:56 -!- Umbire has joined #evilhack 04:05 [hdf-us] [evil] Merrywidow (Wiz Ith Fem Cha) rejected atheism by offering a gnomish wizard corpse on an altar of Anhur, on T:5645 04:10 [hdf-us] [evil] Merrywidow (Wiz Ith Fem Cha) had Magicbane bestowed upon her by Anhur, on T:5892 07:20 [hdf-us] [evil] lgxia (Kni Hum Mal Law) just blew up his bag of holding, on T:44270 07:21 [hdf-us] [evil] lgxia (Kni Hum Mal Law), 112862 points, T:44277, quit 07:41 -!- nabru- is now known as nabru 07:54 -!- elenmirie has quit [Read error: Connection reset by peer] 07:54 -!- elenmirie has joined #evilhack 08:00 -!- amateurhour has joined #evilhack 09:33 -!- elenmirie has quit [Quit: Going offline, see ya! (www.adiirc.com)] 10:01 -!- amateurh1ur has joined #evilhack 10:01 -!- amateurhour has quit [Killed (NickServ (GHOST command used by amateurh1ur))] 10:01 -!- amateurh1ur is now known as amateurhour 10:09 -!- hackemslashem has quit [Ping timeout: 252 seconds] 10:19 -!- hackemslashem has joined #evilhack 11:26 -!- rebatela has joined #evilhack 11:27 -!- elenmirie has joined #evilhack 11:48 -!- rebatela has quit [Ping timeout: 252 seconds] 12:02 amateurhour: What do you think of this memory leak? https://github.com/elunna/hackem/issues/41 12:03 Is otmp not being cleared correctly or something? 12:05 there's a couple of places in pray.c that create an object then don't free it 12:05 line numbers don't match up for me so not sure which bit it is 12:06 ah, sorry I'm in a new branch it's probably off by 2 lines 12:06 I'll pushhh 12:06 give me a sec I'll link to some on github 12:06 Just added minions so I was thinking it was related, but this is not in the same area 12:07 https://github.com/elunna/hackem/blob/master/src/pray.c#L2261 12:07 follow what happens to otmp there 12:07 it creates an object to check different properties of the object type it's picked 12:08 I saw it gets set to (struct obj *) 0; in a couple spots 12:08 But I guess not freed correctly 12:08 that's just setting a pointer, the underlying memory is still allocated then dropped 12:08 so allocated memory, then pointer that points at the memory is set to null 12:09 needs a objfree or whatever the function is called that frees objects 12:09 can't remember offhand what it's called 12:12 `obfree(otmp, (struct obj*)0);` probably, or maybe just `dealloc_obj` as the object is just in the void for testing properties of the type or whatever 12:12 theres delobj and obfree 12:12 oh right 12:12 and dealloc_obj 12:12 many different ones lol 12:12 too many, some might say 12:16 I feel like that leak's gotta be in evilhack as well 12:17 In pray, I've only added a bit for flame/ice mages so I would think so 12:17 blame riker 12:17 well as it looks at face value like it's in evilhack the appropriate strategy is to kick the can over the wall and wait for K2 to fix it :^) 12:18 just kidding, I guess submit an evilhack PR when you fix it :P 12:19 -!- hackemslashem2 has joined #evilhack 12:20 line numbers don't match up in my link above anymore again after latest push, so here's the updated line: 12:20 https://github.com/elunna/hackem/blob/master/src/pray.c#L2309 12:23 Is it as easy as just adding a obfree at the end of the block? Or wherever there is the (struct obj*)0? 12:23 -!- hackemslashem has quit [Ping timeout: 260 seconds] 12:23 yeah something like that 12:23 where the pointer is set to null free it as well as setting the pointer to null basically 12:24 K2 this discussion is relevant to evilhack 12:24 Is there a way to setup the fuzzer to randomy quit and encounter these kinds of memory leaks? 12:25 to randomly quit? 12:25 what do you mean? 12:25 yes, randomly :) 12:25 i guess I don't understand why would it help for the fuzzer to randomly quit 12:25 so after a certain random point leaksan would list the memory leaks I guess 12:26 Maybe I wrong, but I haven't seen memory leaks reported while running the fuzzer normally, only while quitting from regular games 12:26 oh 12:26 you get leaksanitizer output when the program finishes 12:26 btw there's at least one more case in src/pray.c where it happens 12:27 grep for "WRONG object" 12:27 not looked any further if there's other places 12:27 hackemslashem2: just remove the 'if (flags.debug_fuzzer) return 0;' from done2(end.c) if you want the fuzzer to randomly quit 12:27 it will eventually hit that i guess 12:28 Oh yea, maybe add a 1 in 10000 chance or something, it would hit that really quick i bet 12:30 when im king i will make all variant devs playtest their changes with asan and leaksan etc 12:31 It's definitely helped me fill in a lots of gaps, and catch a lot of things I wouldn't have otherwise! 12:32 So... I'm replacing those 2 lines with obfree(otmp, (struct obj *) 0); 12:33 you probably still want to set otmp to null 12:34 cuz otherwise it's pointing at deallocated memory, and if something accidentally uses it after that that's a different kind of bug 12:34 kind of a shame obfree doesn't take a struct obj** and set it to 0 for you but oh well 12:35 or return a struct obj* or something 12:35 for new merged stack if that's a thing? or null if gone 12:36 ah ok 12:36 Yea... It's C, better not take anything for granted :p 12:46 I don't think obfree likes that being passed 12:46 likes what being passed? 12:47 post the diff? 12:49 https://pastebin.com/SCQsianC 12:49 Maybe delobj is the way to go 12:49 put it one line up 12:49 you need to do it before clearing otmp 12:50 Oh really lol, dang 12:51 https://termbin.com/8tkxe I think this covers the ones I noticed in evilhack 12:52 there's one more on there not included on yours (the worst I think because it can make up to 500 objects without freeing them lol) 12:52 K2 see that termbin 12:53 oh actually needs one small fix 12:53 https://termbin.com/eoqy better I think 12:56 yikes, good catch 12:57 actually i guess up to 1000 objects leaked if you are an orcish or elven infidel :P 13:03 [hdf-eu] [evil] McPanther (Pri Trt Mal Neu) killed the Goblin King, on T:1547 13:05 :O 13:05 Let's see if I can do a PR... 13:17 -!- botifico has joined #evilhack 13:17 [EvilHack] elunna forked the repository - https://github.com/elunna 13:26 [hdf-eu] [evil] McPanther (Pri Trt Mal Neu), 2647 points, T:4084, killed by a giant mosquito, while fainted from lack of food 13:34 good work team 13:34 no extra money but there will be extra high fives 13:57 qt amateurhour hackemslashem2 thanks 13:57 Trying to make a PR, but now in this mess of git credential crap 14:04 [EvilHack] k21971 pushed 1 commit to master [+0/-0/±2] https://github.com/k21971/EvilHack/compare/abbf570bcf17...393fefbc064b 14:04 [EvilHack] k21971 393fefb - Fix: memory leak when selecting appropriate material for sacrifice gift. 14:05 Well dang you beat me to it 14:06 what credentials thing are you stuck on? 14:06 needing your github token to have permissions for workflows perhaps? 14:06 I guess I didn't have a "credential manager" setup for git 14:07 I wasn't able to push using a password and login anymore 14:08 ah right, fair enough 14:11 -!- Umbire has quit [Quit: Umbire zaps a wand of digging!] 14:25 qt: Would something like this work, or do we need to drop down through some of the other stuff? https://pastebin.com/0xfKzM2J 14:26 I tried letting it drop down but it hit NH_abort 14:28 seems like that would probably work 14:28 as long as there's no other essential setup done in that function before the done() call 14:29 but assuming you looked it over and didn't notice anything like that, makes sense to me 14:30 It's hard to tell with all the #ifdefs in there... 14:30 I think some of them overlap too 14:33 [hdf-us] [evil] Heliokopis (Wiz Gno Mal Neu), 58 points, T:98, burned by molten lava 15:04 -!- elenmirie has quit [Quit: Going offline, see ya! (www.adiirc.com)] 15:18 -!- VaderFLAG_ has joined #evilhack 15:18 -!- VaderFLAG is now known as Guest9046 15:18 -!- Guest9046 has quit [Killed (tantalum.libera.chat (Nickname regained by services))] 15:18 -!- VaderFLAG_ is now known as VaderFLAG 15:33 -!- elenmirie has joined #evilhack 16:15 -!- elenmirie has quit [Read error: Connection reset by peer] 16:23 -!- elenmirie has joined #evilhack 16:37 -!- Umbire has joined #evilhack 16:44 -!- elenmirie has quit [Ping timeout: 260 seconds] 17:19 -!- VaderFLAG_ has joined #evilhack 17:19 -!- VaderFLAG has quit [Killed (calcium.libera.chat (Nickname regained by services))] 17:19 -!- VaderFLAG_ is now known as VaderFLAG 17:21 -!- amateurhour has quit [Quit: leaving] 17:34 Found another leak in #loot menus: https://github.com/elunna/hackem/issues/46 17:35 K2: pickup.c:974, picklist looks like it might need to be freed in another spot. 17:37 thanks 17:37 xnh bug 17:38 hackemslashem2: try this and see if it still has the error (patch against evilhack) https://termbin.com/jqduk 17:41 this isnt addressed already in xnh? 17:42 (they usually are) 17:42 no this appears to be an extant bug in xnh 17:42 i am going to open an xnh PR if hackemslashem2 can confirm that patch makes it go away 17:43 ack, just remembered I don't have evilhack asan setup... 17:43 2 sec 17:43 why not just apply the same patch to your variant? 17:44 brb 17:44 I did lol, but you said to patch against evil 17:45 It seems to be working, but if I try to give a pet a food ration it crashes 17:45 huh 17:45 and it didn't do that before? 17:46 how do you get this memory leak check thing? 17:46 Well, asan gives me a heap-use-after- https://pastebin.com/d13yF97i 17:47 Amateurhours guide: https://0x0.st/owuY.md 17:48 are you saying there is no additional thing beyond just -fsanitize=address to get these memory leak warnings? 17:48 I have never seen them before and I have asan set up 17:49 or is this valgrind that you're using? 17:49 No valgrind for me yet 17:49 Yea I think it's just those 2 lines in the hints file 17:51 I setup a gdbinit to output the stacktraces to file: this line does that with the ASAN traces: r -D -u wizard 2>err.log 17:52 The memory leak warnings don't seem to happen while fuzzing though, only when you save/exit the program normally 17:53 fixes in xnh won't carry forward to evilhack by default because K2 continues to refuse to rebase evilhack on xnh 17:53 hackemslashem2: can you paste the diff? 17:53 just the current output of git diff 17:54 https://pastebin.com/hLX0SNN8 17:55 Should just be what you sent 17:56 this doesn't make sense to me, isn't the asan error saying it's freed on line 1021 of pickup.c? 17:57 what's on line 1021 for you hackemslashem2? 17:57 for me it's just a } 17:57 looking at your variant from github 17:57 I haven't pushed this most recent stuff 17:58 what is on line 1021 then? 17:59 the free(*pick_list) call in query_objlist? 17:59 } 18:00 I don't get it, then... 18:01 Let me push the most commits then 18:02 Without your patch, I can give pets things without a problem 18:02 have you pushed them? 18:03 ok done 18:04 now we're on the same page :) 18:05 Hmm: You give the little dog your food ration. The little dog can't carry your touchstone. 18:06 mighta been a typo lol 18:07 asan won't even let the game launch for me 18:07 https://termbin.com/ilbw 18:08 I just ran it a second time and it worked, so I guess that doesn't happen every time. but the first time I tried to launch it that happened 18:08 wonderful 18:08 I am not getting any errors or problems transferring item to my pet... 18:09 What happens when you save? 18:09 just "Be seeing you..." 18:09 huh 18:09 but I have never seen any memory leak errors before, maybe they aren't supported on my computer 18:11 amateurhour is the expert here, I'm still learning this stuff 18:11 I thought you said this error with the food ration was an immediate crash though? 18:11 not something that happens when saving? 18:11 That was after I applied your patch - but I did not save/commit that 18:11 I know, I have it applied here 18:11 ah 18:12 extremely weird 18:12 Let me apply it again 18:12 the diff you posted earlier looked as expected to me... 18:14 Ok, now pet giving works fine, what gives... 18:18 Seems fine now, thanks for the fix! 18:18 that is extremely weird 18:18 so mysterious 18:18 I chalk it up to weird quantum mechanic in the build 18:18 yes i guess it was cosmic rays :P 18:19 Speaking of weird problems, today I also got a dead cat that was an illegal material, and 2 globs of moldy pudding that wouldn't merge. Could not reproduce them... 18:20 The cat was made out of cloth btw... 18:20 hmm 18:20 cute 18:20 a stuffed animal 18:21 ^.^ 18:24 Ok way past my bedtime - nite 18:25 goodnight 18:35 [hdf-us] [evil] Blixie (Wiz Elf Fem Neu), 87 points, T:1379, killed by a dart 18:37 does evilhack need this one liner patch still? 18:38 i imagine so 18:38 aosdict i was going to rebase eh onto xnh, but your lawyers sent me a cease and desist letter 18:38 yes it does 18:39 k 18:39 i see the PR you made for xnh 18:39 [hdf-us] [evil] Frozty (Wiz Gno Mal Neu) became Thoth's Envoy of Balance, on T:21670 18:46 -!- Umbire has quit [Ping timeout: 260 seconds] 18:48 [EvilHack] k21971 pushed 1 commit to master [+0/-0/±2] https://github.com/k21971/EvilHack/compare/393fefbc064b...58232fa7be2d 18:48 [EvilHack] k21971 58232fa - Fix: memory leak when looting monster. 19:32 -!- tinklebear has joined #evilhack 20:29 [hdf-us] [evil] dbanethacker (Val Gia Fem Neu) changed form for the first time by mimicking a pile of gold, on T:3532 20:32 [hdf-us] [evil] dbanethacker (Val Gia Fem Neu) eschewed atheism, by dropping an uncursed +1 long sword on an altar, on T:3743 20:33 -!- hackemslashem2 has quit [Ping timeout: 252 seconds] 20:41 [hdf-us] [evil] dbanethacker (Val Gia Fem Neu) had Mjollnir bestowed upon her by Odin, on T:4128 21:06 [hdf-us] [evil] dbanethacker (Val Gia Fem Neu) killed the Goblin King, on T:5018 22:09 [hdf-us] [evil] dbanethacker (Val Gia Fem Neu) had a bone scimitar entrusted to her by Odin, on T:5544 22:11 [hdf-us] [evil] goast (Con Dwa Mal Cha), 58 points, T:95, killed by tumbling down a flight of stairs 22:13 [hdf-us] [evil] dbanethacker (Val Gia Fem Neu) destroyed mightyquinn's ghost, the former Field Worker, on T:5835 22:33 -!- rebatela has joined #evilhack 22:37 [hdf-us] [evil] dbanethacker (Val Gia Fem Neu) had a short sword entrusted to her by Odin, on T:6974