While using class inheritance in mods, it is possible to create a child class inherited from a base class, that allows to access class variables from the base class without initializing them, especially without calling the constructor of the base class using super.
The following code would just work fine in windows, but results in segfaults of the game in linux due to sane memory handling. Under windows the behavior is actually not defined, but windows also doesn't care about its memory.
class BaseClass { int foo; } class ChildClass : BaseClass { void ChildClass(int bar) { foo = bar; } }
I know that it is hard to check for all variables, but I think enforcing to use super in the constructor of an inherited class would be a good start. There are way too many modules out there that cause segfaults due to such issues.