Skip to content

Conversation

@supervacuus
Copy link
Collaborator

@supervacuus supervacuus commented Oct 13, 2025

Fixes #1397 (which also contains an explanation of the approach followed in this PR).

Fixes #1410.

cursor[bot]

This comment was marked as outdated.

@supervacuus supervacuus force-pushed the ref/win/make_path_narrow_utf8_on_windows branch from 9f454e4 to d258fd6 Compare October 13, 2025 11:53
cursor[bot]

This comment was marked as outdated.

@supervacuus supervacuus force-pushed the ref/win/make_path_narrow_utf8_on_windows branch from d258fd6 to 2e4e448 Compare October 13, 2025 12:41
@supervacuus
Copy link
Collaborator Author

@JoshuaMoelans, can you give this a first once over? This is not fully completed according to the scope I had in mind. Still, the PR reflects the most significant portion requiring restructuring, and I would appreciate some SDK internals WTF count from your POV.

Copy link
Member

@JoshuaMoelans JoshuaMoelans left a comment

Choose a reason for hiding this comment

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

This looks pretty good on a first viewing. A few minor comments about some cleanup & clarification.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@supervacuus supervacuus force-pushed the ref/win/make_path_narrow_utf8_on_windows branch from f390f3d to ba2c115 Compare October 20, 2025 12:42
Copy link
Member

@JoshuaMoelans JoshuaMoelans left a comment

Choose a reason for hiding this comment

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

LGTM!

Just a few typo/consistency nits, and adding some const (see #1422) and updating the new logs-on-crash tests to use the expect_failure argument too (#1421)

cursor[bot]

This comment was marked as outdated.

@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@supervacuus
Copy link
Collaborator Author

supervacuus commented Oct 23, 2025

I don't know what is going on with the cursor bot today, but the "bugs" it raises are pure gold:

#1413 (comment)
Why is the comment misleading? It specifies what the function assumes, and the "bug" description verifies (the client includes the null-termination in the length argument). And regarding the more critical (after the seemingly less critical aspect): let call-sites allocate means that this is a static helper, and the translation-unit call-sites are responsible for maintaining path_w. The call site and the static helper are written and used by the same role.

#1413 (comment)
What is confusing is the cursor bot text. It has a very long-winded way of saying in the "bug" description that the code does what it's supposed to. And then raises a concern with its taste buds.

#1413 (comment)
This is very intentional because assignments often trigger static analysis warnings when used in a condition.

And so densely written, it is a pleasure to decipher. This is clearly the future of software development 🤗

@supervacuus supervacuus force-pushed the ref/win/make_path_narrow_utf8_on_windows branch from 617f769 to b71ee72 Compare October 23, 2025 15:03
@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@cursor
Copy link

cursor bot commented Oct 23, 2025

Bug: Crash Reporter: Redundant Conditional Compilation

The Windows version of the crash reporter uses wmain but the non-Windows version uses main. However, both versions end with #ifdef _WIN32 blocks that call _wremove(path) on Windows and remove(path) on non-Windows. The problem is that in the Windows wmain version, path is a wchar_t *, but in the non-Windows main version, path is a char *. This means the #ifdef _WIN32 block at line 100-104 is checking the wrong condition - it's inside a function that's only compiled on Windows (wmain), so the #ifdef _WIN32 is redundant and the #else branch will never execute. This appears to be a logic error in the conditional compilation structure.

Fix in Cursor Fix in Web

…P instead of explict wide to multibyte conversion)
@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@cursor

This comment was marked as spam.

@supervacuus supervacuus merged commit 853bf2d into master Oct 23, 2025
94 of 97 checks passed
@supervacuus supervacuus deleted the ref/win/make_path_narrow_utf8_on_windows branch October 23, 2025 20:53
vaind added a commit that referenced this pull request Nov 3, 2025
PR #1413 changed the arg0 parameter from sentry_pathchar_t* to char*
as part of making narrow UTF-8 the canonical path encoding, but the
signature in sentry_process_none.c was not updated.

This fixes the function signature to match the declaration, changing
arg0 from `const sentry_pathchar_t *` to `const char *`.

Fixes regression from #1413

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
vaind added a commit that referenced this pull request Nov 3, 2025
…1436)

* fix: correct sentry__process_spawn signature in none implementation

PR #1413 changed the arg0 parameter from sentry_pathchar_t* to char*
as part of making narrow UTF-8 the canonical path encoding, but the
signature in sentry_process_none.c was not updated.

This fixes the function signature to match the declaration, changing
arg0 from `const sentry_pathchar_t *` to `const char *`.

Fixes regression from #1413

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update CHANGELOG with unreleased fixes

Added unreleased section with fixes for PS5/Switch compilation regression.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on initialization when database path is too long (breakpad) Use narrow UTF-8 as the canonical encoding for paths on Windows

4 participants