[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Defining and exporting and a variable undefined in a foreach loop cause
From: |
Xavier Sanchez |
Subject: |
Defining and exporting and a variable undefined in a foreach loop cause a Segmentation fault with Make 4.2.1 on Debian bullseye/sid x64 |
Date: |
Thu, 5 Mar 2020 16:22:47 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
Hi, I've got a segfault in __strlen_avx2 () at
../sysdeps/x86_64/multiarch/strlen-avx2.S:65
While defining a variable that has been undefined in a foreach loop using Make
4.2.1 on my Bullseye/sid workstation.
The code is a bit tricky. I've attached the Makefile and the backtrace.
# Bug in GNU Make 4.2.1
#
# defining a variable that has been undefined in a foreach loop produce a
# segfault on X64 machine.
#
# Disabling export avoid the sefault
export
# As same as disabling this define
DISCARD_ENV := templates from script format
define discard_env
$(foreach var,$(DISCARD_ENV),$(eval undefine $(var)))
endef
ARTIFACTS := build/a build/b
# In this situation: defining a variable that has been undefined
# in the foreach loop befaure causes the segfault:
templates := t1.tpl t2.tpl # <----
format := qcow2
.PHONY: all
all: $(ARTIFACTS)
$(ARTIFACTS):
@echo $@
gdb.txt
Description: Text document
Makefile
Description: Text document
- Defining and exporting and a variable undefined in a foreach loop cause a Segmentation fault with Make 4.2.1 on Debian bullseye/sid x64,
Xavier Sanchez <=