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

Nasty segfault from PowderN if file does not exist #1440

Closed
willend opened this issue May 9, 2023 · 2 comments
Closed

Nasty segfault from PowderN if file does not exist #1440

willend opened this issue May 9, 2023 · 2 comments
Labels
mcstas-2.7.2 Known bugs/issues in mcstas-2.7.2 mcstas-3.2 Known bugs/issues in mcstas-3.2 mcstas-3.3 Issues in mcstas-3.3 release mcxtrace-1.7.1 Known bugs/issues in mcxtrace-1.7.1 mcxtrace-3.1 Known bugs/issues in mcxtrace-3.1 ready for release

Comments

@willend
Copy link
Contributor

willend commented May 9, 2023

Could be be done much better than this:

Screenshot 2023-05-09 at 16 54 14
@willend
Copy link
Contributor Author

willend commented May 9, 2023

The main issue is that the PowderN read_line_data function uses Table_Read without considering the return value. Should exit(-1) on NULL.

@willend willend changed the title Nasty segfault on Linux / PowderN McXtrace if file does not exist Nasty segfault from PowderN if file does not exist May 9, 2023
willend pushed a commit that referenced this issue May 9, 2023
willend pushed a commit that referenced this issue May 9, 2023
@willend
Copy link
Contributor Author

willend commented May 9, 2023

Patched on master and mccode-3 for McStas and McXtrace

@willend willend added mcstas-2.7.2 Known bugs/issues in mcstas-2.7.2 mcstas-3.2 Known bugs/issues in mcstas-3.2 mcxtrace-1.7.1 Known bugs/issues in mcxtrace-1.7.1 mcxtrace-3.1 Known bugs/issues in mcxtrace-3.1 mcstas-3.3 Issues in mcstas-3.3 release ready for release labels May 9, 2023
@willend willend closed this as completed Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mcstas-2.7.2 Known bugs/issues in mcstas-2.7.2 mcstas-3.2 Known bugs/issues in mcstas-3.2 mcstas-3.3 Issues in mcstas-3.3 release mcxtrace-1.7.1 Known bugs/issues in mcxtrace-1.7.1 mcxtrace-3.1 Known bugs/issues in mcxtrace-3.1 ready for release
Projects
None yet
Development

No branches or pull requests

1 participant