Skip to content

Split _options and _optionString in OptionSet into separate fields - #6195

Merged
0xdaryl merged 1 commit into
eclipse-omr:masterfrom
a7ehuo:fix-multiple-logging-aot-jit
Oct 7, 2021
Merged

0xdaryl merged 1 commit into
eclipse-omr:masterfrom
a7ehuo:fix-multiple-logging-aot-jit

Conversation

@a7ehuo

@a7ehuo a7ehuo commented Oct 6, 2021

Copy link
Copy Markdown
Contributor

When both AOT and JIT have logs specified and when one is processed
first, the OptionSet._options for the other one has not been set up
properly yet. Since setOptions has not been called for the other
command option, getOptions returns a char pointer to _optionString
that is implicitly casted as TR::Options * because OptionSet._options
and OptionSet._optionString are union. To properly check if
OptionSet._options is valid, it needs to be a separate field.

Fixes #6189

Signed-off-by: Annabelle Huo Annabelle.Huo@ibm.com

When both AOT and JIT have logs specified and when one is processed
first, the OptionSet._options for the other one has not been set up
properly yet. Since setOptions has not been called for the other
command option, getOptions returns a char pointer to _optionString
that is implicitly casted as TR::Options * because OptionSet._options
and OptionSet._optionString are union. To properly check if
OptionSet._options is valid, it needs to be a separate field.

Fixes eclipse-omr#6189

Signed-off-by: Annabelle Huo <Annabelle.Huo@ibm.com>
@a7ehuo
a7ehuo requested a review from mpirvu October 6, 2021 13:41
@a7ehuo

a7ehuo commented Oct 6, 2021

Copy link
Copy Markdown
Contributor Author

@mpirvu Ready for review. Thanks!

@mpirvu mpirvu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mpirvu

mpirvu commented Oct 6, 2021

Copy link
Copy Markdown
Contributor

@0xdaryl Could you please review/merge this simple PR? Thanks

@0xdaryl

0xdaryl commented Oct 7, 2021

Copy link
Copy Markdown
Contributor

Jenkins build all

@0xdaryl 0xdaryl self-assigned this Oct 7, 2021
@0xdaryl
0xdaryl merged commit cb45796 into eclipse-omr:master Oct 7, 2021
@a7ehuo
a7ehuo deleted the fix-multiple-logging-aot-jit branch April 28, 2022 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash when specifying log name in both -Xjit and -Xaot

3 participants