-
Notifications
You must be signed in to change notification settings - Fork 123
toml should be reentrant #4466
Comments
AFAICT all the globals currently used come from Bison/Yacc (they are all @markus2330 I assume this issues is intended for FLOSS? If so, we should probably label it. |
@kodebach thank you, very good input!
As you clarified that Bison has support for it, it can actually be a FLOSS issue. I labelled it. |
Thank you for telling me, GitHub auto completion played a joke on me, I added the task. |
Completed by #4869 |
@flo91 did you test it? Probably also another lexer function needs to be used? |
@markus2330 How can this be tested properly? Is there a specific test case / procedure? I've just noticed that in 8f7142f the files Furthermore, @kodebach wrote in the release-notes:
That sounded to me like it should solve this issue. |
I tried to mount a toml plugin to user:/test/race and run |
src/plugins/toml/driver.c and src/plugins/toml/lexer.l unfortunately has non-const global variables, which easily can lead to weird memory problems and crashes, sometimes with output:
Here a valgrind run:
The global variables should be removed and passed via a plugin-specific struct instead. (In general non-const global variables are not allowed in Elektra, this was an oversight in the code review.)
The text was updated successfully, but these errors were encountered: