The first is %{lua:...} et al parsing which hasn't been (but SHOULD be) changed since forever:
the lua implementation has been left untouched (in so far as possible) in order to
guarantee "legacy compatibility". This behavior is
$ ./rpm -E '%{lua}' Segmentation fault
The "fix" (whatever that means) is similar to whatever Panu did (but I slightly disagree with
Panu's comments regarding expanding empty bodies: package monkeys might benefit from
an error message rather than mysterious expansions of an empty script).
The other non-lua embeddings go through parseEmbedded() and display
$ ./rpm -E '%{git}'
memory alloc (4294967295 bytes) returned NULL.
which at least doesn't segfault even if the failure message is totally uninformative.
There are 2 behaviors with embedded interpreters.
The first is %{lua:...} et al parsing which hasn't been (but SHOULD be) changed since forever:
Segmentation fault
the lua implementation has been left untouched (in so far as possible) in order to
guarantee "legacy compatibility". This behavior is
$ ./rpm -E '%{lua}'
The "fix" (whatever that means) is similar to whatever Panu did (but I slightly disagree with
Panu's comments regarding expanding empty bodies: package monkeys might benefit from
an error message rather than mysterious expansions of an empty script).
The other non-lua embeddings go through parseEmbedded() and display
$ ./rpm -E '%{git}'
memory alloc (4294967295 bytes) returned NULL.
which at least doesn't segfault even if the failure message is totally uninformative.