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

Constructor of SemiExplicitEulerIntegrator accesses nullptr #22742

Open
wei-chen-li opened this issue Mar 12, 2025 · 0 comments · May be fixed by #22743
Open

Constructor of SemiExplicitEulerIntegrator accesses nullptr #22742

wei-chen-li opened this issue Mar 12, 2025 · 0 comments · May be fixed by #22743

Comments

@wei-chen-li
Copy link
Contributor

wei-chen-li commented Mar 12, 2025

What happened?

Currently, the constructor of SemiExplicitEulerIntegrator is as follows:

SemiExplicitEulerIntegrator(const System<T>& system, const T& max_step_size, Context<T>* context = nullptr)
    : IntegratorBase<T>(system, context), 
      qdot_(context->get_continuous_state().num_q()) {
    IntegratorBase<T>::set_maximum_step_size(max_step_size);
}

It allows user to supply nullptr for context, yet it dereferences context without checking.

Version

No response

What operating system are you using?

No response

What installation option are you using?

No response

Relevant log output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant