Godot Engine – Multi-platform 2D and 3D game engine
Go to file
Hein-Pieter van Braam-Stewart ff3099abcf Fix thread_local, tls, ASLR, and DEP with MingW
This commit changes the way Thread::caller_id works. By moving caller_id
to the .cpp file we make sure that the TLS variable doesn't get
relocated twice causing a crash. Since we build with LTO for release
builds (and everyone should be doing that anyway) there is no extra
overhead from the non-static method. We do do an extra bool check now
there but I don't think this will add much in the way of overhead.

This check cannot be avoided if we still want to be able to cache the
thread ID hash, as we had to move the setter because of limitations of
the WinRT platform. The original workaround for this was in #46813 but
this has some unintended consequences. Specifically; threads that never
create a Thread object will always return 0 in Thread::get_caller_id()
which caused a regression. For instance the editor now freezes when
importing large textures. This PR also addresses that.

Additionally we now enable ASLR support when building with MingW, this
includes a workaround for MingW. MingW refuses to create an appropriate
relocation table if no symbols are exported. So we just export the
various main() functions in godot_windows.cpp.

While ASLR support isn't criticial for Godot, previous versions of Godot
just happened to work with a dynamic base 'by accident' and some users
run Godot this way. After the thread change the .tls section now needs
relocations to make this work. By enabling ASLR at build-time we create
these relocations and people who forced ALSR on previously will now get
a working Godot again.

This fixes #47256 and fixes #47219

This is the 3.x version of this PR. For master a different approach is
possible which I will make in the coming days.
2021-03-25 23:20:12 +01:00
.github Use unique test projects for each branch 2021-03-22 18:26:18 +01:00
core Fix thread_local, tls, ASLR, and DEP with MingW 2021-03-25 23:20:12 +01:00
doc doc: Sync classref with 3.3 version bump 2021-03-23 13:40:34 +01:00
drivers Merge pull request #47102 from lawnjelly/large_fvf_revamp 2021-03-23 22:24:36 +01:00
editor Fix transparent editor theme being brighter 2021-03-24 10:31:14 +01:00
main Sync controller mappings DB with SDL2 community repo 2021-03-23 13:41:06 +01:00
misc [HTML5] Clarify editor PWA manifest.json 2021-03-24 11:53:08 +01:00
modules Make LSP parser aware of variables in sub-blocks 2021-03-24 16:52:38 -04:00
platform Fix thread_local, tls, ASLR, and DEP with MingW 2021-03-25 23:20:12 +01:00
scene Add Root Null Check 2021-03-21 01:20:59 +01:00
servers Fix failure in set_primary_interface when parameter is null 2021-03-25 15:29:16 +02:00
thirdparty [Net] Fix miniupnpc UWP build. 2021-03-24 13:13:59 +01:00
.clang-format clang-format: Add JavaImportGroups for Java code 2020-05-07 13:36:27 +02:00
.editorconfig Use space indentation for all YAML files in .editorconfig 2021-02-22 10:15:50 +01:00
.gitattributes Git: Explicitly list binary files as such to avoid EOL change 2019-05-25 10:43:48 +02:00
.gitignore gitignore: Ignore Kate swap files 2021-02-02 13:02:45 +01:00
.mailmap Update AUTHORS and DONORS list 2021-03-08 17:41:14 +01:00
AUTHORS.md Update AUTHORS and DONORS list 2021-03-08 17:41:14 +01:00
CHANGELOG.md Fix typos with codespell 2020-09-18 14:09:51 +02:00
compat.py SCons: Fix python2 compatibility after #37198 and #37248 2020-06-11 20:15:48 +02:00
CONTRIBUTING.md Link to Godot Contributors Chat instead of IRC 2021-03-07 22:51:06 +01:00
COPYRIGHT.txt miniupnpc: Update to version 2.2.2 2021-03-17 15:16:59 +01:00
DONORS.md Update AUTHORS and DONORS list 2021-03-08 17:41:14 +01:00
gles_builders.py SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
icon.png Remove two very slightly displaced duplicate vertices on Gobot's face 2020-12-29 13:54:08 +01:00
icon.svg Remove two very slightly displaced duplicate vertices on Gobot's face 2020-12-29 13:54:08 +01:00
LICENSE.txt Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
LOGO_LICENSE.md Relicense Godot logo from CC-BY-3.0 to CC-BY-4.0 2020-12-09 11:22:04 +01:00
logo.png Remove two very slightly displaced duplicate vertices on Gobot's face 2020-12-29 13:54:08 +01:00
logo.svg Remove two very slightly displaced duplicate vertices on Gobot's face 2020-12-29 13:54:08 +01:00
methods.py SCons: Properly handle overriding default values to bool options 2021-02-24 10:20:46 +01:00
platform_methods.py SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
README.md Link to Godot Contributors Chat instead of IRC 2021-03-07 22:51:06 +01:00
SConstruct Allow to not optimize release build 2021-03-20 23:05:13 +01:00
version.py Bump version to 3.3-rc 2021-03-16 12:16:36 +01:00

Godot Engine

Godot Engine logo

2D and 3D cross-platform game engine

Godot Engine is a feature-packed, cross-platform game engine to create 2D and 3D games from a unified interface. It provides a comprehensive set of common tools, so that users can focus on making games without having to reinvent the wheel. Games can be exported in one click to a number of platforms, including the major desktop platforms (Linux, macOS, Windows), mobile platforms (Android, iOS), as well as Web-based platforms (HTML5) and consoles.

Free, open source and community-driven

Godot is completely free and open source under the very permissive MIT license. No strings attached, no royalties, nothing. The users' games are theirs, down to the last line of engine code. Godot's development is fully independent and community-driven, empowering users to help shape their engine to match their expectations. It is supported by the Software Freedom Conservancy not-for-profit.

Before being open sourced in February 2014, Godot had been developed by Juan Linietsky and Ariel Manzur (both still maintaining the project) for several years as an in-house engine, used to publish several work-for-hire titles.

Screenshot of a 3D scene in Godot Engine

Getting the engine

Binary downloads

Official binaries for the Godot editor and the export templates can be found on the homepage.

Compiling from source

See the official docs for compilation instructions for every supported platform.

Community and contributing

Godot is not only an engine but an ever-growing community of users and engine developers. The main community channels are listed on the homepage.

To get in touch with the engine developers, the best way is to join the Godot Contributors Chat.

To get started contributing to the project, see the contributing guide.

Documentation and demos

The official documentation is hosted on ReadTheDocs. It is maintained by the Godot community in its own GitHub repository.

The class reference is also accessible from the Godot editor.

The official demos are maintained in their own GitHub repository as well.

There are also a number of other learning resources provided by the community, such as text and video tutorials, demos, etc. Consult the community channels for more information.

Actions Build Status Code Triagers Badge Translate on Weblate Total alerts on LGTM TODOs