Bug 2254339 - perl-Coro-Multicore: Use of incompatible pointer type in perlmulticore.h
Summary: perl-Coro-Multicore: Use of incompatible pointer type in perlmulticore.h
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Coro-Multicore
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Florian Weimer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PortingToModernCNoUpstream
TreeView+ depends on / blocked
 
Reported: 2023-12-13 12:02 UTC by Paul Howarth
Modified: 2023-12-15 07:45 UTC (History)
3 users (show)

Fixed In Version: perl-Coro-Multicore-1.07-9.fc40
Clone Of:
Environment:
Last Closed: 2023-12-15 07:45:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Paul Howarth 2023-12-13 12:02:10 UTC
When building perl-Compress-LZF using an instrumented gcc to find issues that will affect GCC 14 (see https://fedoraproject.org/wiki/Toolchain/PortingToModernC#Special_COPR_repository_with_instrumented_GCC), I got this error:

In file included from LZF.xs:5:
/usr/include/perlmulticore.h:195:8: error: initialization of ‘void (*)(PerlInterpreter *)’ {aka ‘void (*)(struct interpreter *)’} from incompatible pointer type ‘void (*)(void)’
  195 |    = { perl_multicore_init, 0 };
      |        ^~~~~~~~~~~~~~~~~~~

The relevant part of perlmulticore.h is this:

--------------------------------------------------------------------------
/* this struct is shared between all modules, and currently */
/* contain only the two function pointers for release/acquire */
struct perl_multicore_api
{
  void (*pmapi_release)(pTHX);
  void (*pmapi_acquire)(pTHX);
};

static void perl_multicore_init (void);

static const struct perl_multicore_api perl_multicore_api_init
   = { perl_multicore_init, 0 };
--------------------------------------------------------------------------

The parameter mismatch seems to have been introduced in the downstream patch Coro-Multicore-1.04-Fix-passing-context.patch.

The same issue shows up when building perl-Coro-Multicore itself using the COPR version of gcc.

Reproducible: Always

Steps to Reproduce:
Try to build perl-Coro-Multicore using the mock configuration shown at https://fedoraproject.org/wiki/Toolchain/PortingToModernC#Special_COPR_repository_with_instrumented_GCC

Comment 1 Florian Weimer 2023-12-15 07:26:44 UTC
(In reply to Paul Howarth from comment #0)
> The parameter mismatch seems to have been introduced in the downstream patch
> Coro-Multicore-1.04-Fix-passing-context.patch.

Thanks, flagging this as a no-upstream bug. I've got a patch that fixes this, I think.


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