Hi everybody,
after switching to ROOT 6.16, I noticed a problem with TFormula. When passing an invalid formula, it segfaults root. In older versions, I got a message printed to the screen and I could continue working normally and was able to call IsValid (and other functions).
Can anyone reproduce this?
$ root
root [0] TFormula f_bad("f", "4x")
input_line_46:2:66: error: invalid suffix 'x' on integer constant
Double_t TFormula____id7894888978604609976(Double_t *x){ return 4x[0] ; }
^
input_line_47:2:66: error: invalid suffix 'x' on integer constant
Double_t TFormula____id7894888978604609976(Double_t *x){ return 4x[0] ; }
^
Error in <prepareMethod>: Can't compile function TFormula____id7894888978604609976 prototype with arguments Double_t*
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00007fcc936006c2 in __GI___waitpid (pid=26769, stat_loc=stat_loc
entry=0x7fffb8df97e8, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1 0x00007fcc9356b067 in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:149
(error omitted since either you see it as well or I need to double check I compiled correctly)
Is there any other easy way to check if a TFormula at least looks like a correct expression?
ROOT Version: 6.16/01, heads/v6-16-00-patches (v6-16-00-52-g82f285fc5c)
ROOT compiled with CXX14=on
Platform: Linux 4.15.0-45-generic x86_64 GNU/Linux
Compiler: g++-7.3.0