Problem with -fno-stack-clash-protection flag on armhf

Bug #2059059 reported by Daniel Richard G.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This concerns libdpkg-perl 1.22.4ubuntu5 in Ubuntu noble.

In /usr/share/perl5/Dpkg/Vendor/Ubuntu.pm, there is this bit:

    # Debian enables -fstack-clash-protection but it causes troubles on armhf
    # (which are not fully analyzed as of writing this); disable it there in
    # order to have time to investigate
    if ($arch eq 'armhf') {
        # Stack clash protector only available on amd64 and arm.
        $flags->set_feature('hardening', 'stackclash', 0);
    }

Then in /usr/share/perl5/Dpkg/Vendor/Debian.pm, this logic:

    # Stack clash
    if ($flags->use_feature('hardening', 'stackclash')) {
        my $flag = '-fstack-clash-protection';
        $flags->append($_, $flag) foreach @compile_flags;
    } else {
        my $flag = '-fno-stack-clash-protection';
        $flags->append($_, $flag) foreach @compile_flags;
    }

Which causes -fno-stack-clash-protection to be added to the package build flags.

Unfortunately, in building Chromium for armhf on noble, I see this (build log excerpt):

    [27780/60083] CXX obj/net/third_party/quiche/quiche/qpack_decoder_stream_receiver.o
    clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
    [27781/60083] CXX obj/net/third_party/quiche/quiche/qpack_encoder_stream_receiver.o
    clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
    [27782/60083] CXX obj/net/third_party/quiche/quiche/qpack_decoder_stream_sender.o
    clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
    [27783/60083] CXX obj/net/third_party/quiche/quiche/qpack_index_conversions.o
    clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
    [27784/60083] CXX obj/net/third_party/quiche/quiche/qpack_encoder_stream_sender.o
    clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
    [27785/60083] CXX obj/net/third_party/quiche/quiche/qpack_encoder.o
    clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
    [27786/60083] CXX obj/net/third_party/quiche/quiche/qpack_instruction_decoder.o
    clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
    [27787/60083] CXX obj/net/third_party/quiche/quiche/qpack_header_table.o
    clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
    [27788/60083] CXX obj/net/third_party/quiche/quiche/qpack_instruction_encoder.o
    clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
    [27789/60083] CXX obj/net/third_party/quiche/quiche/qpack_instructions.o
    clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]

Basically, *every* invocation of the C or C++ compiler gives this warning.

I think the flag needs to be dropped altogether for armhf, not just negated.

Tags: noble
Revision history for this message
Daniel Richard G. (skunk) wrote :

The -fno-stack-clash-protection flag appears to have been dropped from Debian.pm at some point after I filed this report. Closing.

Changed in dpkg (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.