Cuberite Forum
Random Chitchat 2017 - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Off Topic (https://forum.cuberite.org/forum-9.html)
+--- Forum: Off Topic Discussion (https://forum.cuberite.org/forum-10.html)
+--- Thread: Random Chitchat 2017 (/thread-2727.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34


RE: Random Chitchat 2017 - Seadragon91 - 03-01-2017

@xoft I have created 3 issues of crashes in the api, that I found with my plugin APIFuzzing.
Is the issue format okay for everyone? If the format is okay, then I will add more in the next time.


RE: Random Chitchat 2017 - xoft - 03-01-2017

Yes, those are great, keep them coming. We need to fix all these, there's nothing worse than an unstable API.


RE: Random Chitchat 2017 - NiLSPACE - 03-02-2017

@Seadragon91 could you fuzzy the cBlockArea API? I have a feeling you'll get allot of crashes there.


RE: Random Chitchat 2017 - Seadragon91 - 03-02-2017

@NiLSPACE I excluded cBlockArea from fuzzing, because there is already a known problem.
Code:
local area = cBlockArea()
area:Create(10, 10, 10)
for i = 10, 1000 do
area:SetBlockType(i, i, i, 1)
end
This writes out of bounds and will corrupt memory. It can cause a crash directly or after a few tries.
The solution would be to check the passing params, but that would have a huge impact on performance.


RE: Random Chitchat 2017 - xoft - 03-02-2017

I don't really know how to approach this. If we add coord checks into the API, we will impose a penalty on everyone. If we don't, it's possible to crash the server, but well-formed plugins run faster. Which one is better?

Or perhaps we could do something in the middle - check in Debug builds (so that plugin authors get proper error messages) , don't check in Release builds, so that we get better perf.


RE: Random Chitchat 2017 - NiLSPACE - 03-02-2017

Depends on how much performance we'll lose. Have there been any tests?


RE: Random Chitchat 2017 - xoft - 03-03-2017

Not really. That's the most sensible course of action, of course - write some.


RE: Random Chitchat 2017 - NiLSPACE - 03-05-2017

I just tried BabeLua for fun, and surprisingly it worked perfectly with Cuberite. All I had to do is tell it where the executable was and it just worked, including the debugger. Sadly it requires project files to be made and there doesn't seem to be a way to make it know the Cuberite API.


RE: Random Chitchat 2017 - Seadragon91 - 03-05-2017

Wanted to test it. Error: Not for visual studio community edition  Sad


RE: Random Chitchat 2017 - NiLSPACE - 03-05-2017

That's strange, I wouldn't think it would be depended on the type of Visual Studio you have. It does depend on the version of VS though. Are you sure you're not just getting the wrong version? There is a download for 2012, 2013 and 2015.