bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/28903] New: LD producing SegFault executables with FreePascal 2.


From: jbthiel at gmail dot com
Subject: [Bug ld/28903] New: LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later
Date: Thu, 17 Feb 2022 16:48:34 +0000

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

            Bug ID: 28903
           Summary: LD producing SegFault executables with FreePascal
                    2.6.4, in Binutils-2.36.1 and later
           Product: binutils
           Version: 2.36
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: jbthiel at gmail dot com
  Target Milestone: ---

It appears that LD in binutils versions after 2.35 is producing segfault
executables with Free Pascal 2.6.4.  You cannot build a working HelloWorld.

I have written up a full report, please see
  https://gitlab.com/freepascal.org/fpc/source/-/issues/39324

The Free Pascal developers believe this is a regression of a similar LD bug
that previously occurred and was fixed in LD.  They put a workaround/redesign
in later versions of FreePascal, the 3.x series, but are unable to backport
their fix to FPC 2.6.4.
So it needs to be fixed again in binutils LD.

It is very easy to reproduce.
The simplest HelloWorld will yield a segfault executable.  Demonstration:

PROGRAM, put this code in myprog.pas:
program myprog;
begin
writeln('hello');
end.

COMPILE via:
$ /usr/local/fpc-2.6.4/bin/fpc -Xm -va myprog.pas
    -Xm  produces linker map
    -va  gives verbose output

RUN:
$ ./myprog
Segmentation fault


On Gentoo Linux, it works with binutils-2.35, and segfaults with binutils-2.36
and binutils-2.37, both tested.

If you need any other details or test files, please advise and I will try to
supply.

This is an extremely critical bug. It completely kills the 2.6.x series of
FreePascal, which I and likely many others require to keep running.

Gentoo has already switched to binutils-2.37, and started to mask out
binutils-2.35 by default.  A fix is needed soon, before the older versions are
dropped altogether.

Thanks for your work on binutils.

-- JBThiel

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]