[Rpm-maint] [rpm-software-management/rpm] Segmentation fault when a recursive macro contains %[expression] (Issue #3197)

Miro Hrončok notifications at github.com
Sat Jul 6 21:47:19 UTC 2024


**Describe the bug**

This works as expected:

```
$ rpm --define 'aaa %aaa' --eval '%aaa'
error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
```

This crashes:

```
$ rpm --define 'aaa %[%aaa]' --eval '%aaa'
Segmentation fault (core dumped)
```

**To Reproduce**
Run the command above.


**Expected behavior**
An error should happen, not a crash.

**Output**
See above.

**Environment**
 - OS / Distribution: Fedora 39, 41
 - Version rpm-4.19.1.1-1.fc39.x86_64, rpm-4.19.92-2.fc41.x86_64

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3197
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/3197 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240706/2e7cf78a/attachment.html>


More information about the Rpm-maint mailing list