1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
Description: Perl 5.42 / ExtUtils::ParseXS 3.57
Origin: https://rt.cpan.org/Public/Bug/Display.html?id=164982
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=164982
Author: ppisar@redhat.com
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2025-08-22
Applied-Upstream: *** FIXME ***
From 9455d2a6542da3c55351d8fb4b08aabb20245c1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 7 May 2025 16:30:18 +0200
Subject: [PATCH] Remove never compiled EC_POINTs_make_affine() and
EC_POINTs_mul() prototypes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
After upgrading ExtUtils::ParseXS from 3.51 to 3.57 Crypt-OpenSSL-EC-1.32 fails to build:
$ make
cp lib/Crypt/OpenSSL/EC.pm blib/lib/Crypt/OpenSSL/EC.pm
AutoSplitting blib/lib/Crypt/OpenSSL/EC.pm (blib/lib/auto/Crypt/OpenSSL/EC)
Running Mkbootstrap for EC ()
chmod 644 "EC.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- EC.bs blib/arch/auto/Crypt/OpenSSL/EC/EC.bs 644
"/usr/bin/perl" "/usr/share/perl5/vendor_perl/ExtUtils/xsubpp" -typemap '/usr/share/perl5/ExtUtils/typemap' -typemap '/home/test/fedora/perl-Crypt-OpenSSL-EC/Crypt-OpenSSL-EC-1.32/typemap' EC.xs > EC.xsc
Unparseable XSUB parameter: 'EC_POINT *p[]' in EC.xs, line 354
Unparseable XSUB parameter: 'const EC_POINT *p[]' in EC.xs, line 357
Unparseable XSUB parameter: 'const BIGNUM *m[]' in EC.xs, line 357
make: *** [Makefile:362: EC.c] Error 1
The problematic argument with a pointer to an array type trigger the
failure. Old ExtUtils::ParseXS parsed them, but the generated code was
an invalid C code. E.g. This XS:
int
EC_POINTs_make_affine(const EC_GROUP *group, size_t num, EC_POINT *p[], BN_CTX *ctx)
was incorrectly parsed as:
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_EC_POINTs_mul)
{
[...]
RETVAL = EC_POINTs_mul(group, r, n, num, const EC_POINT *p[], const BIGNUM *m[], ctx);
That means that ExtUtils::ParseXS never supported arrays of pointers. Now it
correctly reports na error.
On the other hand, ExtUtils::ParseXS does not understand
C preprocessor directives and does not ignore code enclosed in "#if 0"
macro condition.
This patch simply removes the two protypes.
CPAN RT#164982
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
EC.xs | 10 ----------
1 file changed, 10 deletions(-)
--- a/EC.xs
+++ b/EC.xs
@@ -348,16 +348,6 @@
int
EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx)
-#if 0
-
-int
-EC_POINTs_make_affine(const EC_GROUP *group, size_t num, EC_POINT *p[], BN_CTX *ctx)
-
-int
-EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, size_t num, const EC_POINT *p[], const BIGNUM *m[], BN_CTX *ctx)
-
-#endif
-
int
EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx)
|