RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1951278 - /usr/bin/i686-w64-mingw32-ar -M segfaults sometimes doing the SAVE command
Summary: /usr/bin/i686-w64-mingw32-ar -M segfaults sometimes doing the SAVE command
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: mingw-binutils
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Richard W.M. Jones
QA Contact: rhel8-maint
URL:
Whiteboard:
Depends On: CVE-2021-20197
Blocks: RHEL9BetaFTBFS
TreeView+ depends on / blocked
 
Reported: 2021-04-19 21:23 UTC by Mohan Boddu
Modified: 2021-12-07 21:31 UTC (History)
10 users (show)

Fixed In Version: mingw-binutils-2.34-9.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-07 21:30:47 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed patch (5.14 KB, patch)
2021-04-26 16:11 UTC, Nick Clifton
no flags Details | Diff

Description Mohan Boddu 2021-04-19 21:23:23 UTC
mingw-crt failed to build from source in Red Hat Enterprise Linux 9 CentOS Stream

https://kojihub.stream.rdu2.redhat.com//koji/taskinfo?taskID=247569


For details on the mass rebuild see:

Please fix mingw-crt at your earliest convenience and set the bug's status to
ASSIGNED when you start fixing it.

Comment 2 Richard W.M. Jones 2021-04-26 13:42:02 UTC
mingw-* packages in RHEL 9 (not 8) are mine.

Comment 3 Richard W.M. Jones 2021-04-26 15:05:29 UTC
This is actually a bug in mingw-binutils.  The 'ar' tool crashes:

(gdb) bt
#0  __GI___fileno (fp=0x0) at fileno.c:35
#1  0x0000000000482e81 in ar_save () at ../../binutils/arsup.c:358
#2  yyparse.isra.0 ()
    at /usr/src/debug/mingw-binutils-2.34-8.el9.x86_64/build_win32/binutils/arparse.y:131
#3  0x0000000000403cdb in mri_emul () at ../../binutils/ar.c:179
#4  main (argc=<optimized out>, argv=<optimized out>)
    at ../../binutils/ar.c:778

Comment 4 Richard W.M. Jones 2021-04-26 15:36:04 UTC
This is caused by the following downstream patch that we added for a CVE:

  Subject: [PATCH] binutils: Make smart_rename safe too

Actually it's not even used in Fedora mingw-binutils.  Since RHEL 9 binutils
has moved to 2.35 (vs mingw-binutils 2.34) I am going to synchronize this
with binutils

Comment 5 Richard W.M. Jones 2021-04-26 15:38:37 UTC
Actually no the bogus patch is also present in RHEL 9 binutils
(binutils-CVE-2021-20197.patch).  I don't think we can fix this
for mingw-binutils until this patch can be fixed.

Comment 6 Nick Clifton 2021-04-26 15:45:54 UTC
I suspect that the problem is also related to:

https://sourceware.org/bugzilla/show_bug.cgi?id=27456

Comment 7 Nick Clifton 2021-04-26 15:52:25 UTC
(In reply to Nick Clifton from comment #6)
Sorry, I meant this PR:

  https://sourceware.org/bugzilla/show_bug.cgi?id=27270

Comment 8 Nick Clifton 2021-04-26 16:11:00 UTC
Created attachment 1775641 [details]
Proposed patch

Hi Rich,

  Are you able to try out this patch and see if it solves the problem ?

Cheers
  Nick

Comment 9 Richard W.M. Jones 2021-04-26 16:19:16 UTC
I can.

Actually I went about it in a different way - I manually fixed up
commit 6184480d7ce1bc on top of mingw-binutils 2.34 and I'm testing
that out at the moment.

Your patch looks really very different though - is it derived from
something else upstream?

Comment 10 Nick Clifton 2021-04-26 16:22:55 UTC
(In reply to Richard W.M. Jones from comment #9)
> I can.
> 
> Actually I went about it in a different way - I manually fixed up
> commit 6184480d7ce1bc on top of mingw-binutils 2.34 and I'm testing
> that out at the moment.
>
> Your patch looks really very different though - is it derived from
> something else upstream?

Yes - it is based on comparing the very latest version of the upstream sources of the files affected (arsup.c, rename.c, etc) with the current c9s sources.  If I remember correctly the fix for 27270 works, but also causes some build problems on Windows machines, and with recent versions of gcc and clang.  Hence I thought that synchronizing might be best.

If your solution works, and presumably is simpler, then lets go with that.  I am all for keeping things simple.

Cheers
  Nick

Comment 11 Richard W.M. Jones 2021-04-26 16:29:16 UTC
Since my fix seems to be OK, I went with that:
https://gitlab.com/redhat/centos-stream/rpms/mingw-binutils/-/merge_requests/1

Comment 12 Jeff Nelson 2021-04-28 21:53:51 UTC
Restore assignee that appears to have been accidentally reset when the component was changed (comment 3).

Comment 13 tingting zheng 2021-06-23 02:23:56 UTC
Checked mingw-crt and mingw-binutils package, both have been built successfully:

mingw-crt-8.0.0-3.el9:https://kojihub.stream.rdu2.redhat.com//koji/buildinfo?buildID=5458.
mingw-binutils-2.34-9.el9:https://kojihub.stream.rdu2.redhat.com//koji/buildinfo?buildID=7285.

Comment 17 tingting zheng 2021-07-29 05:47:58 UTC
The bug has been fixed as mingw-crt and mingw-binutils have been built successfully:

mingw-crt-8.0.0-3.el9:https://kojihub.stream.rdu2.redhat.com//koji/buildinfo?buildID=5458.
mingw-binutils-2.34-9.el9:https://kojihub.stream.rdu2.redhat.com//koji/buildinfo?buildID=7285.


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