Skip to content
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

Extract some of #3360 fixes to 10.5.x #3485

Open
wants to merge 1 commit into
base: 10.5
Choose a base branch
from

Conversation

ParadoxV5
Copy link
Contributor

@ParadoxV5 ParadoxV5 commented Aug 28, 2024

  • The Jira issue number for this PR is: MDEV-21978
  • To clarify, my coding period for Google Summer of Code (GSoC) 2024 ended.
    While this code originates from my GSoC project, this publication (i.e., commit and PR descriptions) isn’t.

Description

#3360 uncovered countless potential minor security vulnerabilities on my_snprintf uses.
This commit ports a squashed subset of their fixes according to the bug-fixing process to 10.5, our oldest maintained version.
(My GSoC mentor said that they aren’t much of a problem and I can open a PR normally.)

Most size_ts were still simple uints back here, though I didn’t include their changes from %d to %u so this commit doesn’t conflict when merging up. The exception is sql/table.cc with its large chuncks of diffs from reformatting.
After all, I expect users to upgrade to the newer versions sooner or later.
Similarly, while 10.5 may have had other issues in this category that are obsolete in 11.6 (the branch from which the superset was based on), I am not goïng to hunt them down.

Release Notes

Nothing?
These internal corrections shouldn’t be user-visible (other than perhaps one fewer crashes).

  • Fixed data size mismatches that were garbling outputs (or possibly even crashes) on problematic platforms – mostly on error messages and debug logs

How can this PR be tested?

I’m not certain how we could catch these human errors besides testing #3360 (MDEV-21978) and syncing this PR with it.

Basing the PR against the correct MariaDB version

  • This is a new feature or a refactoring, and the PR is based against the main branch.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

@ParadoxV5
Copy link
Contributor Author

ParadoxV5 commented Aug 28, 2024

Riddle me this, some runners doesn’t understand PRIdPTR while others do.
This problem has come up before too, at #3360 (comment).

Update: Riddle me this, it’s the same error as that one and that tweak works here too.

@ParadoxV5 ParadoxV5 marked this pull request as ready for review August 29, 2024 02:17
@ParadoxV5
Copy link
Contributor Author

ParadoxV5 commented Aug 29, 2024

The Buildbot failure is innodb.innodb-lock-inherit-read_commited timing out (MDEV-33106).

ParadoxV5 added a commit to ParadoxV5/MariaDB-server that referenced this pull request Sep 1, 2024
That PR uncovered countless issues on `my_snprintf` uses.
This commit backports a squashed subset of their fixes (excludes MariaDB#3485).
ParadoxV5 added a commit to ParadoxV5/MariaDB-server that referenced this pull request Sep 13, 2024
That PR uncovered countless issues on `my_snprintf` uses.
This commit backports a squashed subset of their fixes.
(Excludes previous parts MariaDB#3485 and MariaDB#3493)
That PR uncovered countless issues on `my_snprintf` uses.
This commit backports a squashed subset of their fixes.
ParadoxV5 added a commit to ParadoxV5/MariaDB-server that referenced this pull request Sep 14, 2024
That PR uncovered countless issues on `my_snprintf` uses.
This commit backports a squashed subset of their fixes.
(Excludes previous parts MariaDB#3485 and MariaDB#3493)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant