-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault in template_release
build due to optimization level (GCC -O2
)
#85263
Comments
With |
template_release
build due to optimization level (-O2
)template_release
build due to optimization level (GCC -O2
)
Same for me on Windows (MSVC if that's important again). Edit:
Edit2: |
It likely just random garbage from corrupted memory, the issue should be in the
GDScript int (and therefore vformat) is always signed 64-bit int. |
The issues seem to be not in the
|
Godot version
4.2.rc2 (ad72de5)
System information
Mageia 9 - Vulkan (Forward+) - dedicated AMD Radeon RX Vega M GL Graphics (RADV VEGAM) () - Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz (8 Threads)
Issue description
Spin-off from #70910, where the MRP from #70910 (comment) seems to trigger a segfault (on Linux with GCC at least), but only with 4.2 builds, so it appears to be a regression of some sort.
The crash is reproduced when compiling Godot with
scons p=linuxbsd target=template_release
, to whichdebug_symbols=yes
can be added to have a nice stacktrace.Here's the log output and stacktrace:
The main problem seems to be the optimization level.
With
target=template_release
, the default optimization level isoptimize=speed_trace
, which for GCC sets-O2
.I tested a custom build with
-O1
(optimize=debug CCFLAGS=-O1
), which also reproduces the bug.That gives slightly more info in the stacktrace:
With
-O0
(optimize=none
, oroptimize=custom CCFLAGS=-O0
), there's no crash, just endless error spam like in #70910.Steps to reproduce
return
line inControl.gd
as advised by the scripttemplate_release
binary, compiled withscons p=linuxbsd target=template_release debug_symbols=yes
or equivalentMinimal reproduction project
Freebug.zip
The text was updated successfully, but these errors were encountered: