Skip to content

Cleanup/projector

Dennis Gläser requested to merge cleanup/projector into master

Using the factory function makeProjector, I ran into a seg fault with gcc-14 in an ubuntu:24.04 docker image on macOS. In an if statement, an iterator from a call to max_element is dereferenced, however, in my case the container on which it was called was empty.

I followed the program logic, and I couldn't see how this situation could ever happen, that is, this constructor should only be called for non-empty containers. When using debug symbols, the seg fault actually went away. However, I think this sanity check prior to dereferencing makes sense to add in any case.

Merge request reports

Loading