vermaseren / form

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

Load problems with conflicting symmetry properties #397

Open jodavies opened 2 years ago

jodavies commented 2 years ago

If I save an expression such as,

#-
Function f1,f2,f3;
CFunction g;

Global test = g(f1,f2,f3);
.store

Save expr.sav test;
.end

and load it in a file with a conflicting symmetry property for g I get a warning (as one would see with conflicting power restrictions on a symbol, for example) but the load then fails:

Function f1,f2,f3;
CFunction g(cyclesymmetric);

Load expr.sav;
Local ltest = test;

Print +s;
.end
TFORM 4.2.1 (Jul 17 2020, v4.2.1-16-ge66efc5) 64-bits 12 workers  Run: Tue Oct  5 10:56:09 2021
    Function f1,f2,f3;
    CFunction g(cyclesymmetric);

    Load expr.sav;
 test loaded
    Local ltest = test;
Warning: Conflicting symmetry properties for g
load.frm Line 5 --> Problems getting information about stored expression test(4)
Program terminating in thread 0 at load.frm Line 5 --> 
Max. space for expressions:                   0 bytes
  0.00 sec + 0.00 sec: 0.00 sec out of 0.00 sec

Valgrind reports an invalid read in simp6token, "Making sure that factorized expressions are used properly" which seems a weird place for execution to end up here?

Of course, one can work around this by re-declaring `g' with the desired properties after the load and assign.