Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undefined behavior issue in WarpX initialization #4615

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

lucafedeli88
Copy link
Member

This PR fixes an "out of bound" access issue found with UBSAN.
If the moving window is not initialized, moving_window_dir is -1, which resulted in the call of
pc.m_current_injection_position = geom[0].ProbHi(-1); or pc.m_current_injection_position = geom[0].ProbLo(-1);. These are "out of bound" memory accesses.

@lucafedeli88 lucafedeli88 added bug Something isn't working bug: affects latest release Bug also exists in latest release version labels Jan 17, 2024
@lucafedeli88 lucafedeli88 changed the title Fix undefined behavior issue in WarpX initialization [WIP] Fix undefined behavior issue in WarpX initialization Jan 17, 2024
@lucafedeli88 lucafedeli88 changed the title [WIP] Fix undefined behavior issue in WarpX initialization Fix undefined behavior issue in WarpX initialization Jan 17, 2024
@ax3l ax3l added the component: initialization Changes related to the initialization of the simulation label Jan 17, 2024
@ax3l ax3l requested review from dpgrote and ax3l January 23, 2024 00:12
@ax3l ax3l self-assigned this Jan 23, 2024
@RemiLehe RemiLehe merged commit 4ab88c5 into ECP-WarpX:development Jan 23, 2024
39 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: affects latest release Bug also exists in latest release version bug Something isn't working component: initialization Changes related to the initialization of the simulation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants