Time Nick Message 15:01 kilbith this is an interesting lib for MT: https://github.com/yuri/lua-colors/blob/master/lua/colors.lua 15:01 kilbith and it is MIT licensed. 15:19 MTDiscord meh 17:17 erlehmann rubenwardy, is it possible to push updates to minetest game via contentdb? 17:17 rubenwardy If they install it via ContentDB, yes 17:17 rubenwardy Otherwise no 17:17 erlehmann rubenwardy, i am asking because of https://github.com/minetest/minetest_game/blob/5875820542c739ff223a8a6ef8a3e698685b6405/mods/fire/init.lua#L170 17:18 erlehmann you see, the minetest.find_nodes_in_area() call there is exploitable by griefers 17:18 erlehmann they can crash or hang the server 17:18 erlehmann i am working on a lua workaround 17:19 erlehmann but the question is how to get the lua wrapper for minetest.find_nodes_in_area() to the people 17:19 erlehmann rubenwardy, so you'd say it makes sense to put the minetest.find_nodes_in_area() wrapper in minetest_game once it is finished? 17:21 erlehmann btw, it seems from a very lazy review, that there are a bunch of other bugs lurking in the space between MAX_MAPGEN_LIMIT and the limits of s16, that were never found 17:23 erlehmann therefore, in the interest of stability, i want to urge everyone who works on stuff that takes coordinates as s16 or whatever to make sure those function work up to the limits of the underlying data type, not to the limits of “what makes sense in normal usage” 17:23 erlehmann griefers do not care about normal usage 17:24 erlehmann they just want to destroy & crash/hang servers 17:26 MTDiscord In that spirit, you probably shouldn't output warnings 17:33 rubenwardy MTG is released at the same time as the engine 17:33 rubenwardy Makes sense to just fix the engine 17:35 erlehmann rubenwardy, ok let me say it that way: at the moment cora & me publish our reproduction on how to do it, everyone can see in our bug tracker how to crash every current minetest server that uses mcl2, mcl5 or minetest game, except the ones running mineclonia or games that do not copy code from minetest game 17:36 erlehmann and ofc a bug fix needs to have instructions how to verify that it works 17:36 erlehmann so not publishing it is not an option 17:45 sfan5 you seem to be missing a crucial step, how do people get out of bounds? 17:45 erlehmann sfan5 minetest for good reason does not limit falling speed 17:46 erlehmann (don't limit it now that i have said it, you'll break things) 17:46 sfan5 oh yea I forgot 17:46 erlehmann i.e. it is trivial to just fall out of the world 17:46 erlehmann and if you hit exactly the right cordinates, shit happens 17:47 erlehmann the thing is, i think the only way to prevent shit happening is to define one boundary and make everything in it well-behaved and everything out of it illegal. naturally, that would be s16. 17:48 erlehmann all other ways might work, but create additional boundaries (i.e. mod code needs to check more than if a value is out of s16) 17:48 erlehmann and the more boundaries you have, the more trouble 17:50 erlehmann i mean, the thing with player positions being float vectors that then crash the server if you give them to a lua function is an example of a boundary where one part of the code checks it (and crashes), but the other one does not 17:50 erlehmann oh, also ppl are already abusing “teleport player to 0,0,0 if coordinates are illegal” bugfixes to travel far on servers 17:51 erlehmann just in case anyone thinks that is a solution 17:52 rubenwardy We have patch releases for thid 17:52 erlehmann thid? 17:52 erlehmann sfan5, other ways to get out of bounds usually involve attachment/unattachment shenanigans, flinging a player with high speed in some direction 17:52 erlehmann etc. pp. 17:53 erlehmann there are a lot of issues and i think papering over each of those is a lot more work than just defining one boundary and then run unit tests to ensure it is well behaved 17:54 erlehmann there are only about 65536³ = 281474976710656 possible v3s16, that means it is possible to check them all in unit tests 17:54 sfan5 before I leave for the evening I just want to point out that we have never done a patch release for bugs like this 17:55 erlehmann well i am thinking long term 17:55 erlehmann basically, i want minetest servers to not crash, even with the stupidest possible mod code 17:56 erlehmann and fixing all the integer overflows would go a long way towards it 17:56 erlehmann and making sure that all coordinate conversions roundtrip 17:57 erlehmann i have abandoned my plan of client-sent server mods btw 17:57 erlehmann clearly fixing the holes is much more important 17:57 erlehmann bc the bad ppl are stupid, but not that stupid 21:53 MTDiscord "basically, i want minetest servers to not crash, even with the stupidest possible mod code" - a logging error handler would allow for this, but I think it's a bad idea; erroring is preferrable over working with an inconsistent state 21:53 erlehmann luatic, what is an inconsistent state? 21:54 MTDiscord Consider a = 1 + trueas "most stupid mod code". What should the value of a be afterwards, if you're not going to error? 21:54 erlehmann oh no, i mean different stuff 21:54 MTDiscord "there are only about 65536³ = 281474976710656 possible v3s16, that means it is possible to check them all in unit tests" - possible but not reasonable; it would take way too long - only edge cases should be checked, fuzzing should be used 21:55 erlehmann you only need to test the boundaries, but come on, computers are fast. 21:55 MTDiscord Not that fast 21:55 MTDiscord My rule of thumb: It's fine as long as it's roughly about 10^9 (10^12 tops) 21:56 erlehmann regarding stupid mod code: for example, it is known that the lua mapgen is very racy. essentially, you can not be sure that stuff you do in lua mapgen is not deleted by a process that kay27 calls “mapgen griefing”. 21:56 erlehmann there exist a lot of lua workarounds that essentially a) place stuff b) try to figure out if it actually got placed 21:57 erlehmann so they try it again 21:58 erlehmann this is of course a bit stupid, but what should they do? i am of the impression almost everyone thinks thread safety and signed integer overflow are not *that* of a big deal (until they cause crashes) 21:59 erlehmann i have over the time seen a lot of mapgen weirdness (up to “a stone cube hangs in the sky”) that can be explained very well by the mapgen being unreliable 22:00 erlehmann i am not saying the way mod authors deal with it is nice, but the code is out there 22:01 erlehmann tbh the first time kay27 brought this up i thought he was seeing ghosts 22:01 erlehmann because his workarounds are *really* crazy 22:09 Extex Came up with an idea yesterday, add an optional wherein to .register_decoration 22:10 Extex And by doing that you can say for example: in stone and on air 22:10 Extex To make roof decorations 22:20 erlehmann OH LOL 22:23 erlehmann sfan5 i just found out that for a crash-related test case i might need an area that is guaranteed to *NEVER* be touched by mapgen but other stuff should work. does such an area even exist? can i exclude mapgen from some mapblocks maybe using lua? 22:24 erlehmann “use singlenode and always create a new world” is a bit cumbersome (then the test case can not be run on existing worlds) 22:43 erlehmann nice, while writing my test case i found another boundary bug