[Debian-med-packaging] Bug#964082: parsinsert fails it's tests when built with -O2 gcc-13

Étienne Mollier emollier at debian.org
Fri Aug 25 23:22:14 BST 2023


Hi Matthias,

Matthias Klose, on 2023-08-24:
> please can you identify the object file which is wrongly built?
> build two versions, one with -O1, the other with -O2, then combine the
> object files from the two builds to identify a specific file?

Thanks for the procedure, I isolated that ParsInsert.o is the
faulty object file when built with -O2.  Erasing it with the
equivalent object file built with -O1 fixes the errors.

Something intresting though: when I manually build ParsInsert.o
with `c++ -c ParsInsert.c -o ParsInsert.o -O2`, the error
doesn't appear, so it looks to result from a bad combination
with something else.  After suspecting hardening, it turned out
that the following, when combined with build of ParsInsert.o
with -O2 optimization, is causing the test failure:

	-specs=/usr/share/dpkg/no-pie-compile.specs

-O2 alone is not sufficient to cause the failure, and no-pie
specifications neither if combined with only -O1.  Under tabular
form:
	          -O1  -O2
	-fPIE      OK   OK
	-fno-PIE   OK  FAIL

In case this were caused by an optimization kicking in, I tried
logging all optimizations with -fopt-info, but there were no
differences at all between the two flavors of -O2 builds.  In
the light of this finding, I attempted to force build with
-fPIE, which resolved the problem at -O2 and even -O3.  Assuming
this is the right approach, it might be sufficient to resolve
the problem.

What do you think?  Would passing -fPIE be the appropriate
change, or is it possible such change would hide something else
under the carpet?

> also there seem to be some warnings, is the package really ready for C++17?

The upstream version hasn't changed since the introduction of
the package in the archive, ten years ago, so I guess not?

Have a nice day,  :)
-- 
  .''`.  Étienne Mollier <emollier at debian.org>
 : :' :  gpg: 8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
 `. `'   sent from /dev/pts/2, please excuse my verbosity
   `-    on air: Collage - Man In The Middle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-med-packaging/attachments/20230826/27321657/attachment.sig>


More information about the Debian-med-packaging mailing list