Bug 2160077 - perl-Prima-1.67-1.fc38 FTBFS: t/Image/Transform.t aborts
Summary: perl-Prima-1.67-1.fc38 FTBFS: t/Image/Transform.t aborts
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Prima
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
Depends On: 2160682
Blocks: F38FTBFS 2158232
TreeView+ depends on / blocked
 
Reported: 2023-01-11 13:43 UTC by Petr Pisar
Modified: 2023-01-16 14:22 UTC (History)
4 users (show)

Fixed In Version: perl-Prima-1.67-2.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-16 13:10:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github dk Prima issues 78 0 None open t/Image/Transform.t aborts because of overlapping memmove() in img_2d_transform 2023-01-11 16:51:35 UTC

Description Petr Pisar 2023-01-11 13:43:53 UTC
perl-Prima-1.67-1.fc38 fails to build in Fedora 38 because a test aborts:

t/Image/Tile.t .......... ok
*** buffer overflow detected ***: terminated
t/Image/Transform.t ..... 
All 22 subtests passed 
[...]
Test Summary Report
-------------------
t/Image/Transform.t   (Wstat: 134 (Signal: ABRT, dumped core) Tests: 22 Failed: 0)
  Non-zero wait status: 134
  Parse errors: No plan found in TAP output

A difference between passing and failing build root is at <https://koschei.fedoraproject.org/build/14524352>.

A minimized reproducer:

#!/usr/bin/perl
use Prima::sys::Test qw(noX11);
my $p = Prima::Image->create(
    width    => 2,
    height   => 2,
    type     => im::Byte,
    data     => "\1\4..\3\6");
$p->shear(0,0.5);

Comment 1 Petr Pisar 2023-01-11 13:47:53 UTC
Valgrind reports:

==28039== Memcheck, a memory error detector
==28039== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==28039== Using Valgrind-3.20.0 and LibVEX; rerun with -h for copyright info
==28039== Command: perl -Iblib/lib -Iblib/arch t/test.t
==28039== 
==28039== Source and destination overlap in memcpy_chk(0x1ffeffd594, 0x1ffeffd5a0, 24)
==28039==    at 0x484C332: __memcpy_chk (vg_replace_strmem.c:1741)
==28039==    by 0x5735CFB: UnknownInlinedFun (string_fortified.h:36)
==28039==    by 0x5735CFB: img_2d_transform (rotate.c:1171)
==28039==    by 0x56DCCCA: Image_transform (conv.c:961)
==28039==    by 0x566EDD2: template_xs_Bool_Handle_HVPtr (thunks.tinc:3759)
==28039==    by 0x497BECF: Perl_pp_entersub (pp_hot.c:5352)
==28039==    by 0x496D84F: Perl_runops_standard (run.c:41)
==28039==    by 0x48DDFA0: UnknownInlinedFun (perl.c:2721)
==28039==    by 0x48DDFA0: perl_run (perl.c:2644)
==28039==    by 0x109349: main (perlmain.c:110)
==28039== 
**28039** *** memcpy_chk: buffer overflow detected ***: program terminated
==28039==    at 0x48470AC: VALGRIND_PRINTF_BACKTRACE (valgrind.h:6815)
==28039==    by 0x484C3BC: __memcpy_chk (vg_replace_strmem.c:1741)
==28039==    by 0x5735CFB: UnknownInlinedFun (string_fortified.h:36)
==28039==    by 0x5735CFB: img_2d_transform (rotate.c:1171)
==28039==    by 0x56DCCCA: Image_transform (conv.c:961)
==28039==    by 0x566EDD2: template_xs_Bool_Handle_HVPtr (thunks.tinc:3759)
==28039==    by 0x497BECF: Perl_pp_entersub (pp_hot.c:5352)
==28039==    by 0x496D84F: Perl_runops_standard (run.c:41)
==28039==    by 0x48DDFA0: UnknownInlinedFun (perl.c:2721)
==28039==    by 0x48DDFA0: perl_run (perl.c:2644)
==28039==    by 0x109349: main (perlmain.c:110)

Comment 2 Petr Pisar 2023-01-11 16:29:01 UTC
This is probably triggered by upgrading redhat-rpm-config from 235-1.fc38 to 239-1.fc38:

* Tue Jan 03 2023 Siddhesh Poyarekar <siddhesh> - 237-1
- Make _FORTIFY_SOURCE configurable and bump default to 3.

Comment 3 Siddhesh Poyarekar 2023-01-13 20:27:32 UTC
I've posted a PR to fix this in Prima:

https://github.com/dk/Prima/pull/79

Comment 4 Petr Pisar 2023-01-16 13:10:52 UTC
Thanks. I applied the fix in Fedora.


Note You need to log in before you can comment on or make changes to this bug.