Skip to content

Conversation

dsnopek
Copy link
Collaborator

@dsnopek dsnopek commented Mar 28, 2025

Fixes #1741

It looks like we were incorrectly encoding return values for functions that return char32_t, char16_t and wchar_t as pointers to those exact types, whereas Godot is encoding them as pointers to int64_t

This PR fixes that!

In a follow up, we should update both SCons and cmake to use the -fstack-protector-strong flag with GCC and the equivalent flag for all other compilers (at least in debug builds), so that we can catch these sort of issues quicker.

@dsnopek dsnopek added bug This has been identified as a bug crash cherrypick:4.4 labels Mar 28, 2025
@dsnopek dsnopek added this to the 4.x milestone Mar 28, 2025
@dsnopek dsnopek requested a review from a team as a code owner March 28, 2025 12:49
Copy link
Collaborator

@enetheru enetheru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested and it didnt exhibit the crash on my end, with windows 11, msvc.

@dsnopek dsnopek merged commit f3deed0 into godotengine:master Apr 1, 2025
11 checks passed
@dsnopek
Copy link
Collaborator Author

dsnopek commented Jun 24, 2025

Cherry-picked for 4.3 in PR #1803

@dsnopek
Copy link
Collaborator Author

dsnopek commented Jun 24, 2025

Cherry-picked for 4.4 in PR #1805

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This has been identified as a bug crash

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CMake: Tests crashing on Linux with "stack smashing detected"

2 participants