godotengine / godotengine/godot
MSVC compiled release template binaries contain absolute source file paths
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Reproducible in Godot v4.6.stable and perhaps all previous versions of Godot
### System information
Godot v4.6.stable - Windows 11 (build 26200) - Multi-window, 1 monitor - Intel(R) Iris(R) Xe Graphics (Intel Corporation; 32.0.101.7084) - 13th Gen Intel(R) Core(TM) i9-13900H (20 threads) - 15.64 GiB memory
### Issue description
**Summary**
When compiling a release template from source, the resulting binary contains unnecessary debugging information in the form of absolute file paths to Godot source files. This information persists in the final exported game binary, causing bloat and potential privacy concerns.
**Expected Behavior**
Release template binaries compiled with `debug_symbols=no` and `production=yes` should not contain absolute source file paths or other debugging artifacts.
**Actual Behavior**
The binary contains 67 absolute file paths pointing to Godot source files. These paths are quite long (depending on the build directory location + source file names), with each character occupying one byte.
**Example impact:**
- **Binary bloat:** Hundreds or thousands of unnecessary bytes from path strings
- **Privacy concern:** If sources are located in a user directory (e.g.,` C:\Users\Username\Documents\...`), the username and directory structure are exposed in the final binary
- **Unprofessional appearance:** Shipping games with developer-specific absolute paths embedded
**Analysis**
This appears to be compiler/linker debug information that should be stripped in release builds but is not being properly removed despite the correct SCons flags being set.
**Additional Context**
This issue affects both the template binary and all games exported using it, as the paths are carried over into the final game executable.
### Steps to reproduce
1. Compile a release template using: `scons platform=windows target=template_release arch=x86_64 d3d12=no`
(This command implicitly sets `debug_symbols=no`, `production=yes`, `lto=full`, because even if these arguments are added explicitly, the hash of the resulting template does not differ from the hash of the template obtained without explicitly specifying these arguments)
2. Open the resulting template binary in a HEX editor
3. Search for file path strings
Contributor guide
Assessment
This issue has not been assessed yet.