CARTAvis / carta-backend

Source code repository for the backend component of CARTA, a new visualization tool designed for the ALMA, the VLA and the SKA pathfinders.
https://cartavis.github.io/
GNU General Public License v3.0
22 stars 11 forks source link

Backend segfaults if the starting dir isn't contained in the top level folder #1382

Open daikema opened 5 months ago

daikema commented 5 months ago

Describe the bug Unexpected segfault instead of just an error message when the starting dir isn't contained in the top level folder.

To Reproduce Steps to reproduce the behavior:

ubuntu@carta-dave:~$ carta_backend --version
4.1.0
ubuntu@carta-dave:~$ carta_backend --top_level_folder /mnt /home
[2024-06-14 10:27:36.154Z] [CARTA] [info] Writing to the log file: /home/ubuntu/.carta-beta/log/carta.log
[2024-06-14 10:27:36.155Z] [CARTA] [info] /usr/bin/carta_backend: Version 4.1.0
[2024-06-14 10:27:36.155Z] [CARTA] [critical] Starting /home must be a subdirectory of top level /mnt. Exiting carta.
Segmentation fault (core dumped)

Expected behavior An error message, but no segfault.

Platform info (please complete the following information):

Additional context Picked dirs here at random just to duplicate on a more "normal" box an issue originally detected on a minimalist Ubuntu 22 pod.