From: <jue...@go...> - 2023-02-20 15:45:25
|
Hello David, welcome to our users-mailing-list. > Is gawkextlib xml expected to work with gawk 5.2.1 (API 3.2), with the new > AWK_BOOL? We have a build server running that always builds the latest development branch of GNU Awk and the the latest development branch of all the GNU Awk extensions that SourceForge hosts for us. Automatic testing is also done, but I have not seen error message with the combination of the latest branches. > > It works as expected with awk 5.1.1, and with all earlier versions going back to > 4.1.3. I've been using it regularly since 2017. > > But with 5.2.1 I'm seeing anomalous behavior where empty xml elements (e.g. > <doi></doi>) are evaluating as true even though they string-equal "". This sounds like it could become a pretty small regression test case. Assuming that empty XML input elements always cause a differing behaviour. > In connection with that empty xml field, gawk 5.2.1 crashes with > > gawk: ../mkbib.awk:1142: (FILENAME=buzsaki_2003_EEG_source.xml FNR=173) fatal: internal error: file eval.c, line 1358: unexpected parameter type Node_illegal > > If I build with sanitizer, I see concat_exp() doing a double-free of an arg that > was earlier freed by r_interpret(). > > I did a whole slew of experiments to try to understand what's happening, but > it's a large and tricky code base. It seems to have something to do with > Node_var appearing where usually Node_val is, but I was quickly in over my head. > > libgawkextlib and xml.so were both built with gawk-5.2.1 installed. I tried > with old release code and with the latest git sources -- same result, as above. > > If it's useful I can share buzsaki_2003_EEG_source.xml and even the script > that's crashing on 5.2.1. As Andrew said, having a small test case would be nice. If your application works on electroencephalogram data, I might be inclined to have a look at it. In the early 1990s I used the original GNU Awk for processing tons of EEG data. Seeing how the processing of EEG data has changed over the last 30 years may be interesting. Thanks to Daniel for the precise report and to Andrew for the quick reply. Juergen Kahrs |