On Tue, 20 May 2025 13:28:22 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:
> In `SetJtregValue` and `SetMicroValue`, if a default or user-supplied value > was given, the corresponding "local" variable was assigned using :=, which > will force future eager evaluation of the variable, most notably `+=`. > However, if no default nor user-assigned value was given, the variable was > not defined at all, which would lead the first `+=` to create a lazy > evaluated definition (a macro). > > Since this was the common behavior for `JTREG_BASIC_OPTIONS`, we did not > notice that `JTREG_TIMEOUT_FACTOR` did not have a value when it was used, but > that it was assigned later. This made the evaluation broke when we set that > variable on the command line and thus forcing eager definition. > > The fix is to make sure JTREG_TIMEOUT_FACTOR is defined before use. I also > changed so SetJtregValue always assigns with :=, so a similar problem could > not creep in again. The same problem also existed in SetMicroValue, so I > fixed it there too. (There were no bugs caused by this, though.) Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/25327#pullrequestreview-2855413312