Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.org/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 2025-02-17 00:00 and 2025-02-18 00:00
Avatar
Avatar
Learath2
The map format has looots of possible crashes. I don't think we found any dangerous ones. Hope you don't either. Still any crashes you find a fix is appreciated
david loves Jellycar Worlds 2025-02-17 00:40
too late. already found a heap buffer overflow
00:41
and a bunch of ones that result in ilegal instructsons though i have no clue why so no clue if they are dangerus
00:43
also the fact that its a heep buffer overflow not a stack one would make it harder to exsplote
00:46
though i did find a bunch of stack overflows due to recursion of "GetItem" calling "GetExternalItemType" calling "FindItemIndex" calling "GetItem" agien in a loop
00:51
im gonna investigate these bugs mabey make a poc for some of them and make a github isue
Avatar
GitHub BOT 2025-02-17 00:51
Adds hide_auth_status ?i[hide] to hide auth status to other players. The auth status is still shown for authed players. It can be used like this: rcon_auth 1;rcon "hide_auth_status 1" to log in "silently" A player could still find out if someone is authed or not by trying to kick them which would yield the error You can't kick authorized players. Not sure if that's a problem though. Closes #9492

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is...
Avatar
david loves Jellycar Worlds 2025-02-17 01:00
ok after checking all the crashes there are no stack buffer overflows (unless the ilegal instructsons are a result of one witch is quite likely id say but that seems to be in one of the librays so ASAN cant find the cause)
Avatar
GitHub BOT 2025-02-17 01:01
Remove the This server uses an experimental translation from Teeworlds 0.7 to 0.6. Please report bugs on ddnet.org/discord broadcast for 0.7 clients. The translation layer has been in use for years now and should be considered stable. Closes #9611

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to i...
Avatar
GitHub BOT 2025-02-17 01:42

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresss...
Avatar
david loves Jellycar Worlds 2025-02-17 02:12
where do i put the maps my server should be able to load?
02:12
i want to test my maps but i need to conect to a server hosting them
Avatar
@david loves Jellycar Worlds Take a look at https://wiki.ddnet.org/wiki/LAN_Server So if you are on Linux, you would put them in ~/.local/share/ddnet/maps/
LAN servers are servers run locally by a player on their home network, which the hosting player has full control over. There are a lot of reasons to host and use a LAN server. They allow you to: Play privately with friends Host maps not found on public servers Test maps with admin commands and tools And much more! However, there are downsides t...
Avatar
david loves Jellycar Worlds 2025-02-17 02:17
thanks
02:21
huh im running the server on windows and theres no folder at "%appdata%\DDNet" and puting it in the maps folder of "%appdata%\Teeworlds" as well as in the auto folder inside that it doesnt let me load them with /map
02:21
in fact it doesnt let me load anything with /map
02:22
02:22
Avatar
Don't use /map. That command requires you to also have the map in your database. Use change_map test in rcon instead.
Avatar
GitHub BOT 2025-02-17 02:37
Fixes bug introduced by #9365 and fixes the incorrect usage of m_IsInFreeze from that PR. Closes #9578 https://github.com/user-attachments/assets/81e32231-2ecd-4bd6-bffd-9395e8b02f48

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out ...
Avatar
Avatar
furo
Don't use /map. That command requires you to also have the map in your database. Use change_map test in rcon instead.
david loves Jellycar Worlds 2025-02-17 02:42
whats rcon?
02:44
ok looking into the illegal instructson it seems to just be a null pointer derefrence in msvcrt.dll at least on windows
02:44
Avatar
Rcon is the remote console. It allows you to configure and run commands on the server. It can be opened with F2 when connected to server. Login with the automatically generated password or set one yourself by using the guide I sent before.
Avatar
david loves Jellycar Worlds 2025-02-17 02:46
ah thanks
02:47
bruh im out of disk space AGIEN???
02:47
i need to get a bigger hardrive
Avatar
david loves Jellycar Worlds 2025-02-17 03:11
all in all it seems like none of the crashes are in and of themselfs exsplotable
03:11
theres no oob writes
Avatar
GitHub BOT 2025-02-17 03:57
They're not built on Ubuntu 22.04 because one of the dependencies does not support the old rustc version. I had to update the tokio dependency for mastersrv due to an error while building on Windows (error[E0793]: reference to packed field is unaligned). Closes #9539

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/...
06:08
Return of the king
Avatar
Avatar
meloƞ
Return of the king
PRO_Gaming1921 2025-02-17 06:15
The Swedish king have returned
Avatar
no one quits ddnet forever
06:16
once you touch it, it becomes a part of you
Avatar
PRO_Gaming1921 2025-02-17 06:16
Avatar
Avatar
Hecta
once you touch it, it becomes a part of you
PRO_Gaming1921 2025-02-17 06:16
Agreed
06:42
i wonder how possible this is for ddnet, or if it's any use
06:42
im still wanting there to be color correction for maps
Avatar
GitHub BOT 2025-02-17 06:49
b6a6264 Add /unpractice and rework sv_practice_by_default - KebsCS 17198ea Merge pull request #9685 from KebsCS/pr-add-unpractice - def-
06:52
cb7bdc1 Add hide_auth_status ?i[hide] to rcon - furo321 8578111 Merge pull request #9692 from furo321/hide_auth_status - def-
Avatar
GitHub BOT 2025-02-17 07:00
e38081d Remove 0.6<->0.7 translation broadcast - furo321 46928a1 Merge pull request #9693 from furo321/remove-06-07-broadcast - def-
07:06
1f1c49c Update Swedish and add Android translations - furo321 a2eda30 Merge pull request #9694 from furo321/swedish-android - def-
07:08
099468c Build mastersrv and masterping in CI - furo321 95d35da Merge pull request #9696 from furo321/rust-ci - def-
Avatar
Avatar
Hecta
i wonder how possible this is for ddnet, or if it's any use
It's a neat approach, but in many cases needlessly expensive. You can do a lot of colour grading with a few simple math operations, as opposed to doing random access texture lookups (the image on the screen is a lot more random than smoothly increasing texture coordinates)
Avatar
yeah i guess so. i need to make more concept art for update hypotheticals
07:27
if i can't code it i can sure as hell make valid concepts for it
Avatar
MilkeeyCat 2025-02-17 07:40
@Ryozuki this code example panics santatrollet mod foo { pub fn main() -> i32 { for (let mut n: i64 = 1; n <= undefined_var; n = n + 1) { return 0; } } } (edited)
Avatar
Avatar
Ryozuki
xd
MilkeeyCat 2025-02-17 07:45
Also i don't know if it's a feature or a bug: mod foo { struct Owo { field: i32 } pub fn main() -> i32 { let owo: Owo = Owo { field: 11, }; let a: &Owo = &owo; let b: &i32 = a as &i32; return *b; } } I would call it a feature in my lang
Avatar
kek
07:46
ye casts arent checked yet
Avatar
MilkeeyCat 2025-02-17 07:46
it's not possible to cast struct to integer, but it works with references
07:47
100% feature
Avatar
hello mister compiler devs. Why does c++ force you to cast pointers? It's literally all the same type, a pointer
07:50
like wtf why do I need to cast stuff that's already the same thing
Avatar
because when dereferencing it needs to know the target type
07:56
and align
07:56
etc
Avatar
Avatar
Teero
hello mister compiler devs. Why does c++ force you to cast pointers? It's literally all the same type, a pointer
MilkeeyCat 2025-02-17 07:56
you mean that you have to cast uint8_t* and int32_t* even though they are both of type pointer?
07:57
i finally fixed my neovim after updating plugins 😬
Avatar
Avatar
Teero
hello mister compiler devs. Why does c++ force you to cast pointers? It's literally all the same type, a pointer
why would you not want this??
08:02
I want to throw my Entire type system out the window as soon as I need to reference another object
08:03
it is not the same type, a pointer is not a type
08:03
a pointer is one of some mutations on a type
08:04
though they are physically represented as memory addresses, thinking of pointers as “just numbers bro” is toxic thinking for API design
08:05
and anything that requires you to actually keep track of objects over a span of places
08:06
the reason void* is traditionally called user data when used by APIs for example is because this is a rare scenario where the type truly does not matter to the library and it can only be represented (with one overload) by a void* because it doesn’t know the type it will use
08:07
you cannot use a template because that requires knowledge of the types at hand at compile time
Avatar
Avatar
MilkeeyCat
@Ryozuki this code example panics santatrollet mod foo { pub fn main() -> i32 { for (let mut n: i64 = 1; n <= undefined_var; n = n + 1) { return 0; } } } (edited)
fixed
Avatar
Avatar
Ryozuki
because when dereferencing it needs to know the target type
Yea but imagine I'm doing SomeClass *pIdk = pSomeParentClass
Avatar
Avatar
Ewan
why would you not want this??
Because it's annoying to cast to some long ass class name 3 times in the same line
09:06
In c it's not like this
Avatar
@MilkeeyCat are u using rustowl
09:14
orange is a move
Avatar
Avatar
Ryozuki
@MilkeeyCat are u using rustowl
MilkeeyCat 2025-02-17 09:16
I have borrow checker in my noodle
09:17
and my liveness analysis algorithm is wrong, what a great day feelsbadman
Avatar
Avatar
Ryozuki
@MilkeeyCat are u using rustowl
Avolicious 2025-02-17 09:38
I saw rustowl just today in github trending 😄
09:38
Already showed it to my colleagues
Avatar
Avatar
MilkeeyCat
@Ryozuki this code example panics santatrollet mod foo { pub fn main() -> i32 { for (let mut n: i64 = 1; n <= undefined_var; n = n + 1) { return 0; } } } (edited)
fixed
10:38
also now i have intrinsics
10:38
#[intrinsic = "sizeof"] fn sizeof<T>() -> u64;
10:38
ez
Avatar
Avatar
Teero
Yea but imagine I'm doing SomeClass *pIdk = pSomeParentClass
What is this code? Does this even work in C++? Shouldn't this be a dynamic cast?
Avatar
Avatar
Ryozuki
also now i have intrinsics
MilkeeyCat 2025-02-17 10:48
and i have mafs instructions 😏
Avatar
Avatar
Assa
What is this code? Does this even work in C++? Shouldn't this be a dynamic cast?
the point is it doesn't
10:59
static, dynamic and reinterpret cast is literally useless its just for security afaik. (edited)
Avatar
Avatar
Teero
Because it's annoying to cast to some long ass class name 3 times in the same line
I have seen some very dirty helpers, like auto_cast, if you're interested (edited)
Avatar
Avatar
Assa
I have seen some very dirty helpers, like auto_cast, if you're interested (edited)
this is completely useless. why do pointers have a type?
Avatar
just work on the void* if you don't want a type
11:02
here some memory chunk, now do operations on it
Avatar
Avatar
Assa
just work on the void* if you don't want a type
the pointer type shouldn't exist below the user level. Or is there any reason why
Avatar
Avatar
Teero
the pointer type shouldn't exist below the user level. Or is there any reason why
points dont have a type in llvm backend
11:52
they only need a type passed to GEP, the deref instruction
11:52
but type on pointers in c is more for type analisys
11:53
and to know what type to pass to gep
Avatar
does anyone know where I can get the "outdated" image as standalone for the next tile?
12:25
@Souly maybe?
12:29
hmm maybe I can image diff 3767eebead65d482a5666df145f368ef070ec2fd
Avatar
GitHub BOT 2025-02-17 12:46
Builds the programs in their respective src directory instead of creating a new one. Explicitly exclude ubuntu-22.04 instead of only building on latest as requested in #9696

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bound...
Avatar
Avatar
Teero
hello mister compiler devs. Why does c++ force you to cast pointers? It's literally all the same type, a pointer
What Ryozuki said, but also there is no guarantee that all types of pointers have the same representation. There have been architectures/implementations in the past where function pointers and object pointers are of different size. E.g. 8086 architecture comes to mind with its segmented memory where you could have any combination of pointer sizes for object/function depending on the memory model you chose (at-least on MS-DOS) (edited)
Avatar
This is now the best I was able to come up with, still not perfect
Avatar
GitHub BOT 2025-02-17 13:46
0fa7717 Simplify rust CI, explicitly exclude ubuntu-22.04 - furo321 aa3eead Merge pull request #9697 from furo321/simplify-rust-ci - heinrich5991
Avatar
I don't know
14:02
new speedup layer? The map testers said the old one was very annoying with the green shade, because it was hiding too much of the map behind it
14:03
other solution would be just removing the overlay from the editor, because speedtiles are marked by an arrow anyway
Avatar
GitHub BOT 2025-02-17 14:25

Issue

Improve Booster/Speedup design. Currently booster tiles are marked with an ugly green background in the editor. This is not necessary, as boosters are marked with arrows and numbers anyway. The green however is necessary in order to pick the tile from the speedup-tileset. Also boosters contain two numbers in the game overlay, which may be confusing for normal players.

Suggestions

Maybe we should use another speedtile sprite for speedtiles with max_speed set there? Booster str...
Avatar
[femboypig@archlinux ddnet-master]$ cmake -Bbuild \ -DUSE_SSP=OFF \ -DPREFER_BUNDLED_LIBS=ON \ -DCLIENT=OFF \ -DVIDEORECORDER=OFF \ -DWEBSOCKETS=OFF \ -DMYSQL=OFF \ -DAUTOUPDATE=OFF -- Could NOT find Crypto (missing: CRYPTO_LIBRARY CRYPTO_INCLUDEDIR) -- Could NOT find Curl (missing: CURL_LIBRARY CURL_INCLUDEDIR) -- Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDEDIR) -- Could NOT find Ogg (missing: OGG_INCLUDEDIR) -- Could NOT find Opus (missing: OPUS_INCLUDEDIR) -- Could NOT find Opusfile (missing: OPUSFILE_LIBRARY OPUSFILE_INCLUDEDIR) -- Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDEDIR) -- Could NOT find SQLite3 (missing: SQLite3_INCLUDEDIR SQLite3_LIBRARY) CMake Error at cmake/FindSSP.cmake:15 (message): could not find ssp paths Call Stack (most recent call first): CMakeLists.txt:555 (find_package) -- Configuring incomplete, errors occurred! [femboypig@archlinux ddnet-master]$ what is it, help pls
Avatar
In your project, open a terminal: Git submodule update --init --recursive
15:54
And then try building again
Avatar
Avatar
meloƞ
In your project, open a terminal: Git submodule update --init --recursive
it is canceled due to the fact that my internet connection is 500-1000kb/s
Avatar
The download the ddnet-libs folder manually and move it
Avatar
okey, I'll mention you if there are any problems, thank you.
Avatar
@femboypig you can also install the dependencies systemwide if you want to. Did you read the readme? sudo pacman -S --needed base-devel cmake curl ffmpeg freetype2 git glew glslang gmock libnotify libpng opusfile python rust sdl2 spirv-tools sqlite vulkan-headers vulkan-icd-loader wavpack x264
Avatar
Avatar
Teero
@femboypig you can also install the dependencies systemwide if you want to. Did you read the readme? sudo pacman -S --needed base-devel cmake curl ffmpeg freetype2 git glew glslang gmock libnotify libpng opusfile python rust sdl2 spirv-tools sqlite vulkan-headers vulkan-icd-loader wavpack x264
i readed it
16:05
I've done this before.
Avatar
Flamegraph viewer in the terminal. Contribute to YS-L/flamelens development by creating an account on GitHub.
Avatar
hey, how to build ddnet for windows on linux?
16:19
@Teero @meloƞ helpmepls))
Avatar
Avatar
femboypig
i readed it
Jupstar ✪ 2025-02-17 16:20
"Cross-compiling on Linux to Windows x86/x86_64" Weird that you missed that after you read the readme
Avatar
Avatar
Jupstar ✪
"Cross-compiling on Linux to Windows x86/x86_64" Weird that you missed that after you read the readme
Zz its default errors
16:22
Avatar
Avatar
Jupstar ✪
"Cross-compiling on Linux to Windows x86/x86_64" Weird that you missed that after you read the readme
I've seen it
Avatar
Avatar
femboypig
Click to see attachment 🖼️
Jupstar ✪ 2025-02-17 16:26
where did you get that line from?
16:26
BUILD_TESTING is not an option afaik
16:27
does fail too? cmake -Bbuild -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/mingw64.toolchain
Avatar
one second
16:28
yes
16:28
[femboypig@archlinux ddnet-master]$ cmake -Bbuild -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/mingw64.toolchain -- Could NOT find Crypto (missing: CRYPTO_LIBRARY CRYPTO_INCLUDEDIR) -- ** DDNet ** -- Target OS: windows -- Compiler: /usr/bin/x86_64-w64-mingw32-g++ -- Rust version: rustc 1.84.1 (e71f9a9a9 2025-01-27) (Arch Linux rust 1:1.84.1-1) -- Build type: Release -- Dependencies: -- * Curl not found (using bundled version) -- * FFmpeg not found (using bundled version) -- * Freetype not found (using bundled version) -- * Git found -- * Glew not found (using bundled version) -- * GTest found -- * Ogg found -- * OpenSSL Crypto not found -- * Opus found -- * Opusfile not found (using bundled version) -- * PNG not found (using bundled version) -- * Python3 found -- * SDL2 not found (using bundled version) -- * SQLite3 not found (using bundled version) -- * Wavpack not found (using bundled version) -- * Zlib not found (using bundled version) -- * Vulkan not found (using bundled version) -- Configuring done (0.4s) CMake Error in CMakeLists.txt: IMPORTED_IMPLIB not set for imported target "GTest::gtest" configuration "Release". -- Generating done (0.5s) CMake Warning: Manually-specified variables were not used by the project: CMAKE_TOOLCHAIN_FILE CMake Generate step failed. Build files cannot be regenerated correctly. [femboypig@archlinux ddnet-master]$
Avatar
Jupstar ✪ 2025-02-17 16:29
can you maybe remove build dir and try again just to be sure it's not smth else
Avatar
i tried to do this
16:29
same.
Avatar
Jupstar ✪ 2025-02-17 16:29
else this must be somehow related to the gtest version you use
16:29
-DDOWNLOAD_GTEST=ON also won't work?
Avatar
+
Avatar
Jupstar ✪ 2025-02-17 16:30
So previously u tried ON and OFF?
Avatar
no
16:30
onemoment
16:31
yo
16:31
rm -rf build/ && cmake -Bbuild -DDOWNLOAD_GTEST=ON
16:31
its work
16:31
thank you very much (edited)
Avatar
Avatar
femboypig
+
I thought -DOWNLOAD_GTEST=ON
Avatar
Jupstar ✪ 2025-02-17 16:33
Well tbf, it should just work. So maybe gtest changed somehow and is incompatible now
16:33
you can create an issue on github if you want, but maybe cross compile is too niche rn (edited)
16:34
well normally it's set to to ON for windows tho.. weird
Avatar
Avatar
Assa
@Souly maybe?
sry no idea
Avatar
Avatar
Jupstar ✪
Well tbf, it should just work. So maybe gtest changed somehow and is incompatible now
it's compiled for linux
16:55
Zz
16:55
💤
Avatar
Avatar
Jupstar ✪
Well tbf, it should just work. So maybe gtest changed somehow and is incompatible now
huh, same
17:02
I made a mistake compiling for Linux.
Avatar
MilkeeyCat 2025-02-17 17:02
mod vec { extern fn malloc(size: u64) -> *mut u8; extern fn realloc(ptr: *mut u8, size: u64) -> *mut u8; struct Vec<T> { ptr: *mut T, len: u64, cap: u64, // needed cuz missing sizeof instrinsic type_size: u64, } impl<T> Vec<T> { pub fn new(&mut self, value: T) -> Vec<T> { let vec: Vec<T> = Vec::<T> { ptr: malloc(type_size * 32) as *mut T, len: 0, cap: 32, type_size: type_size, }; return vec; } } fn main() -> i32 { let type_size: u64 = 4; let mut vec: Vec<i32> = Vec::<i32>::new(type_size); return 0; } } @Ryozuki how should this code work? 0_o
Avatar
with a hashtag
17:02
see my latest pr
17:02
#
17:02
Vec::<i32>#new
17:02
also
17:02
if u use the last last pr
17:02
u can remove type_size
17:03
mod vec { extern fn malloc(size: u64) -> *mut u8; extern fn realloc(ptr: *mut u8, size: u64) -> *mut u8; #[intrinsic = "sizeof"] fn sizeof<T>() -> u64; struct Vec<T> { ptr: *mut T, len: u64, cap: u64, } impl<T> Vec<T> { pub fn new(type_size: u64) -> Vec<T> { let vec: Vec<T> = Vec::<T> { ptr: malloc(sizeof::<T>() * 32) as *mut T, len: 0, cap: 32, }; return vec; } pub fn push(&mut self, value: T) { let type_size: u64 = sizeof::<T>(); if self.len <= self.cap { let new_cap: u64 = self.cap * 2; self.ptr = realloc(self.ptr as *mut u8, type_size * new_cap) as *mut T; self.cap = new_cap; } let target_ptr: *mut T = (self.ptr + (self.len * type_size)) as *mut T; *target_ptr = value; self.len = self.len + 1; } pub fn get(&self, at: u64) -> &T { // todo: bounds check let target_ptr: *mut T = (self.ptr + (at * sizeof::<T>())) as *mut T; return target_ptr as &T; } } fn main() -> i32 { let type_size: u64 = 4; let mut vec: Vec<i32> = Vec::<i32>#new(type_size); vec.push(2); vec.push(3); vec.push(4); vec.push(5); let pushed: &i32 = vec.get(2); return *pushed; } } @MilkeeyCat
17:03
got intrinsics in
17:03
and assoc
Avatar
Avatar
femboypig
huh, same
@Jupstar ✪
Avatar
using :: there was ambigous
Avatar
Avatar
Ryozuki
mod vec { extern fn malloc(size: u64) -> *mut u8; extern fn realloc(ptr: *mut u8, size: u64) -> *mut u8; #[intrinsic = "sizeof"] fn sizeof<T>() -> u64; struct Vec<T> { ptr: *mut T, len: u64, cap: u64, } impl<T> Vec<T> { pub fn new(type_size: u64) -> Vec<T> { let vec: Vec<T> = Vec::<T> { ptr: malloc(sizeof::<T>() * 32) as *mut T, len: 0, cap: 32, }; return vec; } pub fn push(&mut self, value: T) { let type_size: u64 = sizeof::<T>(); if self.len <= self.cap { let new_cap: u64 = self.cap * 2; self.ptr = realloc(self.ptr as *mut u8, type_size * new_cap) as *mut T; self.cap = new_cap; } let target_ptr: *mut T = (self.ptr + (self.len * type_size)) as *mut T; *target_ptr = value; self.len = self.len + 1; } pub fn get(&self, at: u64) -> &T { // todo: bounds check let target_ptr: *mut T = (self.ptr + (at * sizeof::<T>())) as *mut T; return target_ptr as &T; } } fn main() -> i32 { let type_size: u64 = 4; let mut vec: Vec<i32> = Vec::<i32>#new(type_size); vec.push(2); vec.push(3); vec.push(4); vec.push(5); let pushed: &i32 = vec.get(2); return *pushed; } } @MilkeeyCat
MilkeeyCat 2025-02-17 17:05
That's cool, I didn't understand from where you got type_size in new fn
Avatar
Avatar
femboypig
@Jupstar ✪
rm -rf build/ && cmake -Bbuild \ -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/mingw64.toolchain \ -DDOWNLOAD_GTEST=OFF \ -DENABLE_TESTING=OFF \ -DCMAKE_DISABLE_FIND_PACKAGE_GTest=ON it fixed it.
Avatar
Jupstar ✪ 2025-02-17 17:11
yeah dunno, i have no experience with gtest, it'd create an issue on github
Avatar
@MilkeeyCat i think next ill work on is probs enums
Avatar
MilkeeyCat 2025-02-17 17:14
and im going back to liveness analysis
Avatar
i have to add a drop thing somewhen xd
Avatar
MilkeeyCat 2025-02-17 17:14
waiting for proc macros
Avatar
there wont be
Avatar
MilkeeyCat 2025-02-17 17:15
any macros?
Avatar
Enum, structs instead of classes Ad-hoc polymorphism via traits Parametric polymorphism via generics Expressions and statements rather than only expressions as in many functional languages Built-in dependency manager Built-in linter and formatter Built-in testing tooling Good compilation error messages Inmutability by default, optional mutability Linear type system rather than affine type system No lifetimes Simpler borrow checker Concurrency model. We provide a default runtime with green threads. There is no support for low-level primitives like atomics, mutex and OS threads. There is no Sync and Send traits. This implies that mutability can only happen inside the same process. No relationsihp between modules and files No circular dependencies in modules No macros At the beginning we won't support local type inference at function level. We might add it in the future. Financials decimal type and bigint type as part of the standard library Safe FFI Perfect replayability to be able to easily reproduce Heisenbugs We want to try to have bit-for-bit deterministic/reproducible builds from the beginning. This will be difficult to have but we will do our best. this is the goal list
17:16
Linear type system rather than affine type system
is big
Avatar
MilkeeyCat 2025-02-17 17:17
ad-hoc polymorphism is function overloading?
Avatar
via traits
17:18
its like rust iirc
17:18
Implementing a trait involves providing an implementation of a behavior, which is type-specific and separate from other implementations ("ad hoc"), and which may be invoked with the same spelling at the call-site as other implementations ("polymorphic")
17:19
trait Foo { fn foo(); } impl Foo for X { ... } impl Foo for Y { ... }
17:19
I am learning some polymorphism. The wiki page for rust addresses trait is a method to achieve ad hoc polymorphism, and the page for ad hoc polymorphism says function overloading is an example of a...
17:20
the only other lang with a borrow checker and a linear type system i know is https://austral-lang.org/spec/spec.html
Avatar
MilkeeyCat 2025-02-17 17:20
every time i see word polymorphic i think it's some rocket science
Avatar
rust type system is affine
Avatar
Avatar
MilkeeyCat
every time i see word polymorphic i think it's some rocket science
xd
Avatar
finally made a place to properly discuss the UI for automapper inside of ddnet since people are interested https://github.com/VoxelDoesCode/ddnet/discussions/2
This is where I will be keeping track of all my concept art and ideas for communicating about a GUI for making and editing automappers, for people both inside and outside of Discord. There's a ...
Avatar
Avatar
Hecta
finally made a place to properly discuss the UI for automapper inside of ddnet since people are interested https://github.com/VoxelDoesCode/ddnet/discussions/2
If people dont care enough, it might go unnoticed. Maybe open an issue in DDNet, or a link to it
Avatar
dont you think the issues tab is cluttered enough?
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
rusl
20:25
20:25
Contribute to SAWARATSUKI/KawaiiLogos development by creating an account on GitHub.
Avatar
Very readable README
20:26
404 NotFound や 403 Forbidden,503 Service Unavailable などのレスポンスコードは
Stuff I understand 🥳
20:27
Took me a while to find the language options on top
Avatar
See all the VTuber-styled service icons made by artists.
20:30
wow
20:31
I am a Teepot, uses a mug
Avatar
MilkeeyCat 2025-02-17 20:34
@Learath2 Just look at this beautiful assembly generated roughly for such C code: int64_t main() { int64_t a = 1 + 2; int64_t b = 3 + 4; return b - a; } .section .text .global main main: .L0: mov r15, 1 add r15, 2 mov r14, 3 add r14, 4 mov rax, r14 sub rax, r15 ret
Avatar
Avatar
MilkeeyCat
@Learath2 Just look at this beautiful assembly generated roughly for such C code: int64_t main() { int64_t a = 1 + 2; int64_t b = 3 + 4; return b - a; } .section .text .global main main: .L0: mov r15, 1 add r15, 2 mov r14, 3 add r14, 4 mov rax, r14 sub rax, r15 ret
Wow, that actually looks pretty good
Avatar
Avatar
MilkeeyCat
@Learath2 Just look at this beautiful assembly generated roughly for such C code: int64_t main() { int64_t a = 1 + 2; int64_t b = 3 + 4; return b - a; } .section .text .global main main: .L0: mov r15, 1 add r15, 2 mov r14, 3 add r14, 4 mov rax, r14 sub rax, r15 ret
pog
Avatar
MilkeeyCat 2025-02-17 20:37
graph coloring looks so much better than my previous way of allocating registers xd
Avatar
niceu
Avatar
GitHub BOT 2025-02-17 20:55
The client crashes when an invalid map 8.map.zip is loaded. Such a map can be delivered to the client by a malicious server. tested on ubuntu 21 on commit https://github.com/teeworlds/teeworlds/commit/c56fa9e6a20cfc9d7d16502e18c7d7633acdf492 and on the steam verson for windows. on windows this crash is caused by a null ptr derefrence in msvcrt.dll. i am unsure of the root cause
Avatar
c moment
Avatar
david loves Jellycar Worlds 2025-02-17 20:58
get ready for a few more
Avatar
Avatar
david loves Jellycar Worlds
get ready for a few more
Please don't open more issues about the map format unless you can create these maps with the DDNet client alone. As I said, I'm already working on adding checks and one issue "add all the checks" is enough as a reminder. Specific issue are only useful once we actually have a good coverage or if the bad map was created without using external tools. Otherwise more than 99.99% of possible map files currently crash. Last time I fuzzed I stopped after around 20000 crashes.
Avatar
david loves Jellycar Worlds 2025-02-17 21:08
ok sorry
21:09
😦
Avatar
no problem, thanks for your interest 🙂
Avatar
david loves Jellycar Worlds 2025-02-17 21:12
so to be clear if i find something that is acsualy exsplotable you still dont want me to report it?
21:12
i havent yet but if i do
Avatar
if you find a write access with the map format then do report it
21:13
AFAIK there shouldn't be any out of bounds writes
21:13
But OOB reads are everywhere
Avatar
david loves Jellycar Worlds 2025-02-17 21:14
indded
21:14
and a stack overflow
21:14
cant froget that
Avatar
Are there currently?
Avatar
david loves Jellycar Worlds 2025-02-17 21:14
yes
Avatar
Stack overflows would also be bad, do you have a map file and confirmed that it's a stack overflow?
Avatar
david loves Jellycar Worlds 2025-02-17 21:16
yes one sec let me find the one agien
21:19
21:19
21:19
recurson baby
21:19
@Robyt3
Avatar
oh, guess I didn't find that in Teeworlds because it doesn't have UUID-based map items
Avatar
david loves Jellycar Worlds 2025-02-17 21:21
im gonna be honist i fail to see how its exsplotable
21:21
with all the return adresses overiting the stack instead of our data
21:21
well in additson to our data
Avatar
ah, so it's a map with an loop in the data
Avatar
david loves Jellycar Worlds 2025-02-17 21:22
from what i can tell yes
21:22
thats my best guss anyways
21:22
as all outer crashes involving that funcson (so most of them) happen after only 1 call
21:23
so can you exsplane how this would be more exsplotable?
Avatar
GitHub BOT 2025-02-17 21:23
Skin loading and refreshing --------------------------- Add CSkinDescriptor class to describe the information related to the skin textures of a CTeeRenderInfo so the skin textures can be refreshed independently from the other attributes. Add CManagedTeeRenderInfo class as wrapper for a CTeeRenderInfo and a corresponding CSkinDescriptor. Instances of CManagedTeeRenderInfo are managed as std::shared_ptrs by the gameclient. This allows skin textures of all `CManagedTeeRenderInf...
Avatar
Avatar
david loves Jellycar Worlds
so can you exsplane how this would be more exsplotable?
I'm not sure if it potentially is, haven't looked deeply into it. Should generally be hard to exploit due to randomized address space I think
Avatar
david loves Jellycar Worlds 2025-02-17 21:25
yea but some of the dependencys dont have alsr
21:25
namely libwinpthread-1.dll and zlib1.dll
21:26
and yes thouse are both loaded in normal gameplay
21:27
so if you can get full contual over the stack pointer and bellow it then it shouldnt be too hard to make a rop chain right?
21:27
the verson on steam at least doesnt have stack canarys
Avatar
Avatar
Robyt3
I'm not sure if it potentially is, haven't looked deeply into it. Should generally be hard to exploit due to randomized address space I think
david loves Jellycar Worlds 2025-02-17 21:29
would it not?
Avatar
I'm not an expert on this, but all stack overflows should be fixed
Avatar
david loves Jellycar Worlds 2025-02-17 21:32
the main chalange as far as i can tell is getting the funcsons to acsualy return
Avatar
david loves Jellycar Worlds 2025-02-17 21:47
so do you want me to report it or no @Robyt3
Avatar
Avatar
david loves Jellycar Worlds
so do you want me to report it or no @Robyt3
yeah, I guess you can create an issue for it
Avatar
david loves Jellycar Worlds 2025-02-17 22:02
ok
Avatar
GitHub BOT 2025-02-17 22:12
The client crashes when an invalid map 57.zip is loaded. Such a map can be delivered to the client by a malicious server. tested on ubuntu 21 on commit https://github.com/ddnet/ddnet/ commit/258010c417671b0962105adb01334f2dc9e951f2 (might have been a little bit later of a commit dont remeber the exsact commit i pulled from and idk how to check dont use github much) and on the steam verson for windows. as far as i can tell it is due ...
Avatar
david loves Jellycar Worlds 2025-02-17 22:13
done
👍 2
Avatar
david loves Jellycar Worlds 2025-02-17 22:32
want me to make reports of any networking bugs i find or no to that too
Avatar
Avatar
david loves Jellycar Worlds
want me to make reports of any networking bugs i find or no to that too
yes, but if you find a way to crash the server or something like that then reporting it privately in admin-mail would be better (#✉-create-a-ticket)
Avatar
david loves Jellycar Worlds 2025-02-17 22:56
ok
23:01
i assume that crashing the client doesnt count as something like that unless it could be used for rce?
Avatar
yeah, there are various crashes if the connecting process doesn't go according to plan, but unless it's a OOB write or stack overflow it's probably already known
23:08
and if a server owner wanted to crash a client they could just send an invalid map
23:09
crashing a client without it even connecting would be pretty bad though
Avatar
david loves Jellycar Worlds 2025-02-17 23:11
yea exsactly
23:12
though unless the master server sends invalid data i have 0 clue how you would crash the client without it even connecting
Exported 280 message(s)
Timezone: UTC+0