bug-gawk
[Top][All Lists]
Advanced

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

Persistent memory requires non-PIE executable - fixed


From: Aharon Robbins
Subject: Persistent memory requires non-PIE executable - fixed
Date: Thu, 06 Feb 2025 16:17:25 +0200
User-agent: Heirloom mailx 12.5 6/20/10

Hello everyone,

When persistent memory support was added to gawk, it became necessary
to ensure that gawk was compiled as a non-PIE (Position Independant
Executable) executable file.  This applied to GNU/Linux and Intel macos
systems; persistent memory wasn't supported on Arm based macos systems.

The use of PIE executables enables Address Space Layout Randomization
(ASLR), which is considered to increase security, so in general,
PIE binaries are a good idea.

It recently came to my attention that one of the major GNU/Linux distributions
is compiling gawk as a PIE file and simply disabled the 'pma' test in
the test suite.  On this system, the second run of gawk with a persistent
backing store crashes.

Really, this is the distro's error.  But in an effort to make life
easier all around, I figured out how to disable ASLR at run time,
for both GNU/Linux and macos, removing the requirement to compile gawk
as a non-PIE exe. This has the nice property of making persistent
memory available on Arm based macos systems as well.

The attached patch is relative to the current gawk-5.3-stable branch
in Git. I'm about to merge it in. I'm posting it here so that GNU/Linux
distros can apply it to their versions of gawk, should they wish to do so.

The changes to configure, extension/configure, and doc/gawk.info
have been omitted, they will have to be regenerated.

Enjoy,

Arnold

Attachment: pma.diff
Description: Text Data


reply via email to

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