Skip to content

[24101] Fix build in GCC 15#6263

Merged
juanlofer-eprosima merged 4 commits intomasterfrom
bugfix/cstdint-security
Jan 21, 2026
Merged

[24101] Fix build in GCC 15#6263
juanlofer-eprosima merged 4 commits intomasterfrom
bugfix/cstdint-security

Conversation

@raulojeda22
Copy link
Copy Markdown
Contributor

@raulojeda22 raulojeda22 commented Jan 20, 2026

Description

Fix compilation with GCC 15 by adding missing #include <cstdint> to SharedSecretHandle.h.
GCC 15 is stricter about implicit includes, and uint8_t requires an explicit #include <cstdint>. Without this include, compilation fails with errors like:

error: 'uint8_t' was not declared in this scope

Additionally, GCC 15 shows a false positive warning in sqlite3.c:

warning: ‘strlen’ reading 1 or more bytes from a region of size 0 [-Wstringop-overread]
35253 |   return 0x3fffffff & (int)strlen(z);

Which is fixed in this PR by changing the if statement to a ternary operator.

@Mergifyio backport 3.4.x 3.3.x 3.2.x 2.14.x

Fixes #6254

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • N/A Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • N/A Any new/modified methods have been properly documented using Doxygen.
  • N/A Any new configuration API has an equivalent XML API (with the corresponding XSD extension)
  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.
  • Changes are API compatible.
  • N/A New feature has been added to the versions.md file (if applicable).
  • N/A New feature has been documented/Current behavior is correctly described in the documentation.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • N/A: If this is a critical bug fix, backports to the critical-only supported branches have been requested.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

Signed-off-by: Raül <raulojeda@eprosima.com>
@raulojeda22 raulojeda22 added this to the v3.5.0 milestone Jan 20, 2026
Copy link
Copy Markdown
Contributor

@cferreiragonz cferreiragonz left a comment

Choose a reason for hiding this comment

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

Add also CMake flags into this line to build Fast DDS with Security and Statistics features in the alternative build workflow

Signed-off-by: Raül <raulojeda@eprosima.com>
@github-actions github-actions bot added the ci-pending PR which CI is running label Jan 20, 2026
Signed-off-by: Raül <raulojeda@eprosima.com>
@raulojeda22 raulojeda22 changed the title [24101] Include cstdint needed in GCC 15 [24101] Fix build in GCC 15 Jan 20, 2026
Signed-off-by: Raül <raulojeda@eprosima.com>
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jan 20, 2026

🧪 CI Insights

Here's what we observed from your CI run for 37e96d5.

❌ Job Failures

Pipeline Job Health on master Retries 🔍 CI Insights 📄 Logs
Fast DDS MacOS CI mac-ci / fastdds_test () Unknown 0 View View

✅ Passed Jobs With Interesting Signals

Pipeline Job Signal Health on master Retries 🔍 CI Insights 📄 Logs
Fast DDS Ubuntu CI ubuntu-ci / fastdds_build (RelWithDebInfo) Base branch is broken, but the job passed. Looks like this might be a real fix 💪 Broken 0 View View

Copy link
Copy Markdown
Contributor

@cferreiragonz cferreiragonz left a comment

Choose a reason for hiding this comment

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

LGTM with green CI

@cferreiragonz cferreiragonz added ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. and removed ci-pending PR which CI is running labels Jan 21, 2026
@juanlofer-eprosima juanlofer-eprosima merged commit 8b28dab into master Jan 21, 2026
42 of 46 checks passed
@juanlofer-eprosima juanlofer-eprosima deleted the bugfix/cstdint-security branch January 21, 2026 08:38
@cferreiragonz
Copy link
Copy Markdown
Contributor

@Mergifyio backport 3.4.x 3.3.x 3.2.x 2.14.x

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jan 21, 2026

backport 3.4.x 3.3.x 3.2.x 2.14.x

✅ Backports have been created

Details

Cherry-pick of 8b28dab has failed:

On branch mergify/bp/2.14.x/pr-6263
Your branch is up to date with 'origin/2.14.x'.

You are currently cherry-picking commit 8b28dabf3.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   include/fastdds/rtps/security/common/SharedSecretHandle.h
	modified:   src/cpp/rtps/persistence/sqlite3.c

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   test/dds/communication/dyn_network/Dockerfile

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

mergify bot pushed a commit that referenced this pull request Jan 21, 2026
* Include cstdint needed in g++ 15.2.0

Signed-off-by: Raül <raulojeda@eprosima.com>

* Add Security and Statistics features in the alternative build workflow

Signed-off-by: Raül <raulojeda@eprosima.com>

* Suprpess false positive warning in GCC 15 at sqlite3.c

Signed-off-by: Raül <raulojeda@eprosima.com>

* Add missing cmake-args and includes in alphabetical order

Signed-off-by: Raül <raulojeda@eprosima.com>

---------

Signed-off-by: Raül <raulojeda@eprosima.com>
(cherry picked from commit 8b28dab)
mergify bot pushed a commit that referenced this pull request Jan 21, 2026
* Include cstdint needed in g++ 15.2.0

Signed-off-by: Raül <raulojeda@eprosima.com>

* Add Security and Statistics features in the alternative build workflow

Signed-off-by: Raül <raulojeda@eprosima.com>

* Suprpess false positive warning in GCC 15 at sqlite3.c

Signed-off-by: Raül <raulojeda@eprosima.com>

* Add missing cmake-args and includes in alphabetical order

Signed-off-by: Raül <raulojeda@eprosima.com>

---------

Signed-off-by: Raül <raulojeda@eprosima.com>
(cherry picked from commit 8b28dab)
mergify bot pushed a commit that referenced this pull request Jan 21, 2026
* Include cstdint needed in g++ 15.2.0

Signed-off-by: Raül <raulojeda@eprosima.com>

* Add Security and Statistics features in the alternative build workflow

Signed-off-by: Raül <raulojeda@eprosima.com>

* Suprpess false positive warning in GCC 15 at sqlite3.c

Signed-off-by: Raül <raulojeda@eprosima.com>

* Add missing cmake-args and includes in alphabetical order

Signed-off-by: Raül <raulojeda@eprosima.com>

---------

Signed-off-by: Raül <raulojeda@eprosima.com>
(cherry picked from commit 8b28dab)
mergify bot pushed a commit that referenced this pull request Jan 21, 2026
* Include cstdint needed in g++ 15.2.0

Signed-off-by: Raül <raulojeda@eprosima.com>

* Add Security and Statistics features in the alternative build workflow

Signed-off-by: Raül <raulojeda@eprosima.com>

* Suprpess false positive warning in GCC 15 at sqlite3.c

Signed-off-by: Raül <raulojeda@eprosima.com>

* Add missing cmake-args and includes in alphabetical order

Signed-off-by: Raül <raulojeda@eprosima.com>

---------

Signed-off-by: Raül <raulojeda@eprosima.com>
(cherry picked from commit 8b28dab)

# Conflicts:
#	test/dds/communication/dyn_network/Dockerfile
MiguelCompany pushed a commit that referenced this pull request Jan 21, 2026
* Fix build in GCC 15 (#6263)

* Include cstdint needed in g++ 15.2.0

Signed-off-by: Raül <raulojeda@eprosima.com>

* Add Security and Statistics features in the alternative build workflow

Signed-off-by: Raül <raulojeda@eprosima.com>

* Suprpess false positive warning in GCC 15 at sqlite3.c

Signed-off-by: Raül <raulojeda@eprosima.com>

* Add missing cmake-args and includes in alphabetical order

Signed-off-by: Raül <raulojeda@eprosima.com>

---------

Signed-off-by: Raül <raulojeda@eprosima.com>
(cherry picked from commit 8b28dab)

# Conflicts:
#	test/dds/communication/dyn_network/Dockerfile

* Fix conflict

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

---------

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
Co-authored-by: Raül Ojeda Gandia <raulojeda@eprosima.com>
Co-authored-by: Emilio Cuesta <emiliocuesta@eprosima.com>
MiguelCompany pushed a commit that referenced this pull request Jan 23, 2026
* Include cstdint needed in g++ 15.2.0



* Add Security and Statistics features in the alternative build workflow



* Suprpess false positive warning in GCC 15 at sqlite3.c



* Add missing cmake-args and includes in alphabetical order



---------


(cherry picked from commit 8b28dab)

Signed-off-by: Raül <raulojeda@eprosima.com>
Co-authored-by: Raül Ojeda Gandia <raulojeda@eprosima.com>
MiguelCompany pushed a commit that referenced this pull request Jan 26, 2026
* Include cstdint needed in g++ 15.2.0



* Add Security and Statistics features in the alternative build workflow



* Suprpess false positive warning in GCC 15 at sqlite3.c



* Add missing cmake-args and includes in alphabetical order



---------


(cherry picked from commit 8b28dab)

Signed-off-by: Raül <raulojeda@eprosima.com>
Co-authored-by: Raül Ojeda Gandia <raulojeda@eprosima.com>
MiguelCompany pushed a commit that referenced this pull request Feb 6, 2026
* Include cstdint needed in g++ 15.2.0

Signed-off-by: Raül <raulojeda@eprosima.com>

* Add Security and Statistics features in the alternative build workflow

Signed-off-by: Raül <raulojeda@eprosima.com>

* Suprpess false positive warning in GCC 15 at sqlite3.c

Signed-off-by: Raül <raulojeda@eprosima.com>

* Add missing cmake-args and includes in alphabetical order

Signed-off-by: Raül <raulojeda@eprosima.com>

---------

Signed-off-by: Raül <raulojeda@eprosima.com>
(cherry picked from commit 8b28dab)
MiguelCompany pushed a commit that referenced this pull request Feb 6, 2026
* Include cstdint needed in g++ 15.2.0



* Add Security and Statistics features in the alternative build workflow



* Suprpess false positive warning in GCC 15 at sqlite3.c



* Add missing cmake-args and includes in alphabetical order



---------


(cherry picked from commit 8b28dab)

Signed-off-by: Raül <raulojeda@eprosima.com>
Co-authored-by: Raül Ojeda Gandia <raulojeda@eprosima.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Ready to be merged. CI and changes have been reviewed and approved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing cstdint include

3 participants