libs3 ftbfs on ppc64el with -O3

Bug #2021564 reported by Shengjing Zhu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libs3 (Ubuntu)
Fix Released
Undecided
Steve Langasek

Bug Description

src/util.c:367:13: error: ‘SHA1_transform’ reading 64 bytes from a region of size 63 [-Werror=stringop-overread]
  367 | SHA1_transform(context->state, &(data[i]));
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/util.c:367:13: note: referencing argument 2 of type ‘const unsigned char[64]’
src/util.c: In function ‘HMAC_SHA1’:
src/util.c:276:13: note: in a call to function ‘SHA1_transform’
  276 | static void SHA1_transform(uint32_t state[5], const unsigned char buffer[64])
      | ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors

-O3 triggers a -Werror=stringop-overread warning. But building the package with -O2 is just fine.

Related branches

Shengjing Zhu (zhsj)
tags: added: ftbfs update-excuse
Revision history for this message
Shengjing Zhu (zhsj) wrote :
Revision history for this message
Steve Langasek (vorlon) wrote :

Why clear -O3 and turn off all optimizations, instead of passing -Wno-error=stringop-overread?

Changed in libs3 (Ubuntu):
status: New → Incomplete
Revision history for this message
Shengjing Zhu (zhsj) wrote :

The intention is to follow the Debian builds. We could also patch the code to strip -werror. But the package already suffers ftbfs bug due to difference in Debian buildflags, I thought it would be more easier for us to align Debian for further maintenance.

Revision history for this message
Shengjing Zhu (zhsj) wrote :

change the patch to use -Wno-error=stringop-overread and it builds too https://code.launchpad.net/~zhsj/ubuntu/+source/libs3/+git/libs3/+merge/444228

Steve Langasek (vorlon)
Changed in libs3 (Ubuntu):
status: Incomplete → In Progress
assignee: nobody → Steve Langasek (vorlon)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libs3 - 2.0-4ubuntu1

---------------
libs3 (2.0-4ubuntu1) mantic; urgency=medium

  * d/rules: append -Wno-error=stringop-overread on ppc64el (LP: #2021564)

 -- Shengjing Zhu <email address hidden> Wed, 07 Jun 2023 02:57:07 +0000

Changed in libs3 (Ubuntu):
status: In Progress → 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.