pwd memory leak
< Newer Topic
:: Older Topic >
Pages:<< prev 1 next >>
#1 Jan 11, 2025 9:38 am
Geomancer
GroupAdministrators
Posts1,994
JoinedJul 26, 2005
==7934==ERROR: LeakSanitizer: detected memory leaks Direct leak of 65 byte(s) in 1 object(s) allocated from: #0 0x14c6a09fe6c8 in operator new[](unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:98 #1 0x555ecb0b19d7 in str_dup(char const*) /home/remcon/afkmud/src/editor.cpp:185 #2 0x555ecb0615da in fread_string_nohash(_IO_FILE*) /home/remcon/afkmud/src/db.cpp:713 #3 0x555ecb2b0180 in fread_char(char_data*, _IO_FILE*, bool, bool) /home/remcon/afkmud/src/save.cpp:1340 #4 0x555ecb2b4373 in load_char_obj(descriptor_data*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool) /home/remcon/afkmud/src/save.cpp:2527 #5 0x555ecb0f716c in hotboot_recover() /home/remcon/afkmud/src/hotboot.cpp:849 #6 0x555ecb02e609 in init_mud(bool, int) /home/remcon/afkmud/src/comm.cpp:449 #7 0x555ecae0c65f in main /home/remcon/afkmud/src/comm.cpp:1307 #8 0x14c6a02fc1c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #9 0x14c6a02fc28a in __libc_start_main_impl ../csu/libc-start.c:360 #10 0x555ecae120c4 in _start (/home/remcon/afkmud/src/afkmud+0x1ca0c4) (BuildId: 6d3668a895702351d21a7466169450e5169745b5) SUMMARY: AddressSanitizer: 65 byte(s) leaked in 1 allocation(s).
Thats in the new one, still have the flush_buffer issue as well where its putting in extra stuff when sending lots of data with pager off.
#2 Jan 11, 2025 2:05 pm
Last edited Jan 11, 2025 2:11 pm by Samson
Black Hand
GroupAdministrators
Posts3,719
JoinedJan 1, 2002
I don't understand how that could be a memory leak. The same functions are used to load the player from a standard login and does exactly the same thing with their password.
I only get weird stuff like that on bad boot ups when testing things. The sudden abort triggers the leak detection. Hotboot should not be doing that.
I only get weird stuff like that on bad boot ups when testing things. The sudden abort triggers the leak detection. Hotboot should not be doing that.
#3 Jan 11, 2025 2:31 pm
Geomancer
GroupAdministrators
Posts1,994
JoinedJul 26, 2005
well it was just a loadup login messed around did a hotboot and later did a shutdown to see if it had any listed leaks and it showed that one.
#4 Jan 11, 2025 2:32 pm
Geomancer
GroupAdministrators
Posts1,994
JoinedJul 26, 2005
Its possible just not freed on shutdown but if thats the case it is probably leaking all the time from characters. I didn't test it out to see.
#5 Jan 11, 2025 6:31 pm
Black Hand
GroupAdministrators
Posts3,719
JoinedJan 1, 2002
Ok, found the issue. fread_char was using the wrong string loader to load password hashes.
Since I've been running my tests without doing full shutdowns I never ran into the leak report at exit. Hotboot had nothing to do with it, this would have been leaking password hashes in memory for pretty much everyone who logged on and then quit. 64 bytes at a time.
It's not information anyone other than the MUD owner could see so it's not a security issue since they could just look right at someone's pfile instead to get the hash. Either way, leaks are bad, and it'll be fixed with the next codebase update.
Since I've been running my tests without doing full shutdowns I never ran into the leak report at exit. Hotboot had nothing to do with it, this would have been leaking password hashes in memory for pretty much everyone who logged on and then quit. 64 bytes at a time.
It's not information anyone other than the MUD owner could see so it's not a security issue since they could just look right at someone's pfile instead to get the hash. Either way, leaks are bad, and it'll be fixed with the next codebase update.
Pages:<< prev 1 next >>