vermaseren / form

The FORM project for symbolic manipulation of very big expressions
GNU General Public License v3.0
1.16k stars 138 forks source link

Crash with replace_ and nested functions #106

Closed manteuffel closed 8 years ago

manteuffel commented 8 years ago

Hi,

I would like to report a minor issue with replace_. I encounter a program termination when trying to execute the following piece of code:

cfunction prop, mom;
vector q1, q2, k1, k2, p;

l test =  prop(mom(-q1-q2+p));
multiply replace_(q1,k1-k2);
print+s;
.sort
multiply replace_(q2,k2);
print+s;
.end

Without the mom(), the program works fine. Also, if I join the replacements into a single replace_, no problem occurs. Tested with https://github.com/vermaseren/form/commit/9720d7f2339f257049757a75a5db43edfbb4968a .

Thank you very much for providing and maintaining Form.

Best regards, Andreas

tueda commented 8 years ago

Just for information: this bug was introduced in 8ee418f.