Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2020-04-09 00:00:00Z and 2020-04-10 00:00:00Z
Avatar
@Trafalgar Law nope, that's how it was changed in code. We support both now, and the comment text was changed
Avatar
Hi All, can someone please assist me. I've cloned ddnet ddrace github server and followed the guide https://forum.ddnet.tw/viewtopic.php?t=2730, but when I type top5points it shows correct points and names, but the order is incorrect. ex. 1. User1 Points: 7 2. User2 Points: 5 2. User3 Points: 3 2. User4 Points: 1
Avatar
Valgrind throws me out this error: ==11204== Syscall param write(buf) points to uninitialised byte(s) ==11204== at 0x4109033: write (in /lib/libc-2.13.so) ==11204== by 0x8049654: main (mmbox...
08:15
remember the uninit bytes we thought they were false positives?
08:16
This is not necessarily a problem, other than a small security issue: The previous contents of memory, which may hold sensitive information, will get written to the file. You can memset the structure to 0 before filling its fields to avoid this error.
08:25
i will mem_zero it for now
Avatar
u sure, u want to mem zero a stack variable that isn't used for anything else than this? 😄
08:26
i mean
08:26
you can legit get sensitive info writing map data xd
08:26
if u dont memzero
08:26
but maybe its not worth
08:26
@Deleted User what do you recommend
Avatar
what sensitive data does ddnet contain?
Avatar
not ddnet but ur memory
Avatar
actually i cannot really imagine how this is a security issue in our case
Avatar
iguess its a bit unrealistic
Avatar
let me read the stackoverflow thing
Avatar
i added the hlighted line
Avatar
ah i see, its written into the map file?
Avatar
then yes, memzero is good
Avatar
all io stuff should be as secure as possible 😄
Avatar
but it only wriotes the bytes it writes to the buffer?
08:30
then actually its not a problem
08:30
i cannot imagine rn what the code does tbh
Avatar
int Bytes = io_read(MapFile, &aChunk, sizeof(aChunk));
08:30
i wonder if this stops at a null byte
08:30
or
Avatar
but it only writes what it reads
Avatar
reads to fill achunk
08:30
yeah
Avatar
but that should be safe
Avatar
valgrind disagrees
08:31
justatest
Avatar
thats strange actually
Avatar
do u see the valgrind error?
Avatar
but i think in the stackoverflow example it writes a whole struct
08:32
Syscall param write(buf) points to uninitialised byte(s)
Avatar
probably bcs its a syscall, valgrind checks the whole memory
Avatar
i think we are writing uninited bytes to the map
08:32
according to valgrind
Avatar
it only says it points to it, not writes it 😄
08:39
@Deleted User if a struct has a variable char[8], calling memzero on that struct will also zero the array? i guess not right
08:39
i may have found something then
08:39
or not
Avatar
memzero a struct zeros every byte in it
08:39
even padded bytes
08:40
arrays in structs increase the struct size
08:40
bcs they arent heap memory
08:41
btw
08:41
that valgrind issue
08:41
it says that the memory that is uninitializes is at a malloc by fwrite (edited)
08:41
which is the sys call already
08:42
or am i getting that info wrong xD
08:43
i think its really just because valgrind knows the size of that variable
08:43
08:44
i see so its not our fault
Avatar
i don't see how it could be
Avatar
thanks for the help
08:45
makes sense
08:45
im a bit new to valgrind and stuff
Avatar
well, i don't garantuee it, but i doubt something that basic is wrongly implemented in tw
08:46
but if the return of io_write equals the read of io_read it couldn't have gone over it
Avatar
@Ryozuki have u run this code in debug mode btw?
Avatar
@Ryozuki Do you have any idea why the top5points aren't showing correctly
Avatar
ye its in debug mode
09:10
i have no idea about the points
Avatar
do the points need to be triggered by a manual recalculation?
Avatar
i think recalculation is done when a map points is changed
Avatar
ok 😄
Avatar
but idk
09:11
deen is the one who knows
Avatar
@TwItCh best is, you ask deen directly and provide him information about the sql database you are using
Avatar
Thank you @Deleted User
Avatar
@Ryozuki
09:39
Official Home Page for valgrind, a suite of tools for debugging and profiling. Automatically detect memory management and threading bugs, and perform detailed profiling. The current stable version is valgrind-3.15.0.
09:40
it checks the entire buffer
Avatar
I suggest deleting these branches: DDRace, 128players, 516, 517, aio, emoji, heinrich5991-pr_ddnet_map_settings, new_db_scheme, pr_ddnet_map_settings. Any opinions?
Avatar
Hello
13:08
Who can help
13:08
Why im not have all servers in game
13:08
max 177 servers
13:08
but normal 300 +
13:08
who can help
Avatar
who here
13:19
@Skeith
Avatar
No idea
Avatar
:(
Avatar
@Ryozuki as @Deleted User said, I don't see the problem from stackoverflow in our code
Avatar
@Deleted User maybe one of the master servers is blocking you? I see 256 servers consistently
14:26
oh, just jumped to 301. So some master server isn't responding properly after all
Avatar
:I
14:45
Idk
14:45
maybe no blocked
14:46
me
16:02
just found out about this
16:02
nice script
Avatar
How does antibot module work?
Avatar
by default, it doesn't do anything
17:21
you can write your own antibot module that exports the same functions that the null antibot does, and plug that into your ddnet server
17:22
the antibot module used by the official ddnet servers is the one by noby
Avatar
ChillerDragon 2020-04-09 20:10:33Z
Anyone wanna share private vs public github contribs here? Im kinda interested how u all doin privatley
20:10
Avatar
I barely have private repositories
20:15
apparently I don't have any private repositories
20:16
I have access to two private repositories of others
Exported 120 message(s)