Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/log_expected_warnings
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/usr/include/c++/13/bits/new_allocator.h:172:33: warning: ‘*(std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >*)((char*)&saved + offsetof(Rust::BIR::PatternBindingBuilder::SavedState, Rust::BIR::PatternBindingBuilder::SavedState::regions.tl::optional<Rust::FreeRegions>::<unnamed>.tl::detail::optional_move_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_move_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_operations_base<Rust::FreeRegions>::<unnamed>.tl::detail::optional_storage_base<Rust::FreeRegions, false>::<unnamed>)).std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_M_impl.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl::<anonymous>.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl_data::_M_start’ may be used uninitialized [-Wmaybe-uninitialized]
Copy link
Member

Choose a reason for hiding this comment

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

since these warnings originate from our code I think it might be good to spend some time and try to fix them while we update the CI to that new GCC version

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since our bootstrap ci is passing, I'd think it would have to be a false positive.

Copy link
Member

Choose a reason for hiding this comment

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

#3888 should take care of the narrowing one.

/usr/include/c++/13/bits/stl_vector.h:370:49: warning: ‘*(std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >*)((char*)&saved + offsetof(Rust::BIR::PatternBindingBuilder::SavedState, Rust::BIR::PatternBindingBuilder::SavedState::regions.tl::optional<Rust::FreeRegions>::<unnamed>.tl::detail::optional_move_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_move_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_operations_base<Rust::FreeRegions>::<unnamed>.tl::detail::optional_storage_base<Rust::FreeRegions, false>::<unnamed>)).std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_M_impl.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl::<anonymous>.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl_data::_M_end_of_storage’ may be used uninitialized [-Wmaybe-uninitialized]
/usr/include/c++/13/bits/stl_vector.h:370:49: warning: ‘*(std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >*)((char*)&saved + offsetof(Rust::BIR::PatternBindingBuilder::SavedState, Rust::BIR::PatternBindingBuilder::SavedState::regions.tl::optional<Rust::FreeRegions>::<unnamed>.tl::detail::optional_move_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_move_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_operations_base<Rust::FreeRegions>::<unnamed>.tl::detail::optional_storage_base<Rust::FreeRegions, false>::<unnamed>)).std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_M_impl.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl::<anonymous>.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl_data::_M_end_of_storage’ may be used uninitialized [-Wmaybe-uninitialized]
/usr/include/c++/13/bits/stl_vector.h:370:49: warning: ‘*(std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >*)((char*)&saved + offsetof(Rust::BIR::PatternBindingBuilder::SavedState, Rust::BIR::PatternBindingBuilder::SavedState::regions.tl::optional<Rust::FreeRegions>::<unnamed>.tl::detail::optional_move_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_move_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_operations_base<Rust::FreeRegions>::<unnamed>.tl::detail::optional_storage_base<Rust::FreeRegions, false>::<unnamed>)).std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_M_impl.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl::<anonymous>.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl_data::_M_start’ may be used uninitialized [-Wmaybe-uninitialized]
52 changes: 25 additions & 27 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@ on:
branches: [ master ]
merge_group:

env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

jobs:
build-and-check-ubuntu-64bit:

env:
# Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
LC_ALL: C.UTF-8

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand All @@ -41,6 +38,8 @@ jobs:
gcc-multilib \
g++-multilib \
dejagnu;
# enable unshare
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
# install Rust directly using rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
Expand Down Expand Up @@ -68,7 +67,7 @@ jobs:
- name: Check for new warnings
run: |
cd gccrs-build
< log grep 'warning: ' | grep rust | sort > log_warnings
< log grep 'warning: ' | grep -i rust | sort > log_warnings
if diff -U0 ../.github/log_expected_warnings log_warnings; then
:
else
Expand Down Expand Up @@ -104,7 +103,7 @@ jobs:
# Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
LC_ALL: C.UTF-8

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand All @@ -126,6 +125,8 @@ jobs:
gcc-multilib \
g++-multilib \
dejagnu;
# enable unshare
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
# install Rust directly using rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
Expand All @@ -148,12 +149,13 @@ jobs:
cd gccrs-build; \
# Add cargo to our path quickly
. "$HOME/.cargo/env";
make -Otarget -j $(nproc) 2>&1 | tee log
# Build without network access
unshare --net --ipc -r /bin/bash -c "make -Otarget -j $(nproc) 2>&1 | tee log ; exit \${PIPESTATUS[0]}"
- name: Check for new warnings
run: |
cd gccrs-build
< log grep 'warning: ' | grep rust | sort > log_warnings
< log grep 'warning: ' | grep -i rust | sort > log_warnings
if diff -U0 ../.github/glibcxx_ubuntu64b_log_expected_warnings log_warnings; then
:
else
Expand Down Expand Up @@ -189,7 +191,7 @@ jobs:
# Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
LC_ALL: C.UTF-8

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand All @@ -211,6 +213,8 @@ jobs:
gcc-multilib \
g++-multilib \
dejagnu;
# enable unshare
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
# install Rust directly using rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
Expand All @@ -232,12 +236,13 @@ jobs:
cd gccrs-build; \
# Add cargo to our path quickly
. "$HOME/.cargo/env";
make -Otarget -j $(nproc) 2>&1 | tee log
# Build without network access
unshare --net --ipc -r /bin/bash -c "make -Otarget -j $(nproc) 2>&1 | tee log ; exit \${PIPESTATUS[0]}"
- name: Check for new warnings
run: |
cd gccrs-build
< log grep 'warning: ' | grep rust | sort > log_warnings
< log grep 'warning: ' | grep -i rust | sort > log_warnings
if diff -U0 ../.github/log_expected_warnings log_warnings; then
:
else
Expand Down Expand Up @@ -294,6 +299,8 @@ jobs:
libmpc-dev \
build-essential \
dejagnu;
# enable unshare
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
# install Rust directly using rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
Expand Down Expand Up @@ -341,8 +348,8 @@ jobs:
run: |
# Add cargo to our path quickly
. "$HOME/.cargo/env";
PATH=$HOME/gcc-5.4.0/bin:$PATH \
make -C gccrs-build -j $(nproc)
# Build without network access
PATH="$HOME/gcc-5.4.0/bin:$PATH" unshare --net --ipc -r /bin/bash -c "make -C gccrs-build -j $(nproc) ; exit \${PIPESTATUS[0]}"
- name: Run Tests
run: |
Expand Down Expand Up @@ -435,7 +442,7 @@ jobs:
# Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
LC_ALL: C.UTF-8

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand All @@ -457,6 +464,8 @@ jobs:
gcc-multilib \
g++-multilib \
dejagnu;
# enable unshare
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
# install Rust directly using rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
Expand All @@ -479,19 +488,8 @@ jobs:
cd gccrs-build; \
# Add cargo to our path quickly
. "$HOME/.cargo/env";
make -Otarget -j $(nproc) 2>&1 | tee log
# Skip warnings check
# - name: Check for new warnings
# run: |
# cd gccrs-build
# < log grep 'warning: ' | sort > log_warnings
# if diff -U0 ../.github/log_expected_warnings log_warnings; then
# :
# else
# echo 'See <https://github.com/Rust-GCC/gccrs/pull/1026>.'
# exit 1
# fi >&2
# Build without network access
unshare --net --ipc -r /bin/bash -c "make -Otarget -j $(nproc) 2>&1 | tee log ; exit \${PIPESTATUS[0]}"
- name: Run Tests
run: |
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ccpp32alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@ on:
branches: [ master ]
merge_group:

env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

jobs:
build-alpine-32bit-and-check-alpine-32bit:

env:
# Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
LC_ALL: C.UTF-8

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -81,7 +78,7 @@ jobs:
run: |
cd gccrs-build
# grep exits with 1 if it doesn't find at least one match
< log grep 'warning: ' | ../.github/safe-grep rust | sort > log_warnings
< log grep 'warning: ' | ../.github/safe-grep -i rust | sort > log_warnings
cat log_warnings
shell: alpine.sh {0}
- name: Archive warnings logs
Expand Down
Loading