DUNE-DAQ / DUNE-DAQ/triggeralgs

Edge case of missing init throws segfault in AbstractFactory

Open
#94 4 comments 0 reactions 1 assignee View on GitHub

@MRiganSUSX is already working on this.

Since Mar 3, 2025.

enhancement
Dominant language
C++
Stars
0
Forks
7
Avg merge
2m
Merged PRs (30d)
1

Description

When developing in dunetrigger, we ran into an annoying segfault that was due to not properly including the abstract factory in a larsoft algorithm.
The solution was just add back to the CMakeLists what was missing (git was a bit naughty).

The problem was that due to missing initialization, the map had invalid pointers. Is it worth considering adding some valid pointer check here?
https://github.com/DUNE-DAQ/triggeralgs/blob/ffa3de173717862de430868a619f02f932dd5a34/include/triggeralgs/AbstractFactory.hxx#L27

I know it's a very special case that probably does not matter for online, but Wes said he could not hurt to do it. Feel free to discard the issue if you think there's no need.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.