octave-dicom: shared usage of dicomdict across plugins results in crash on program exit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-13 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
octave-dicom (Debian) |
Confirmed
|
Unknown
|
|||
octave-dicom (Ubuntu) |
Fix Released
|
Undecided
|
Dan Bungert |
Bug Description
dicomdict is both functionality provided as a .oct file but also code that is shared among other .oct files (dicominfo.oct dicomwrite.oct dicomlookup.oct dicomdisp.oct dicomanon.oct)
programs which use any two of these, including the built-in test suite for octave-dicom, may experience a crash-on-exit.
This is due to the following lines from octave-dicom src/Makefile.in:
```
need_dict = dicominfo.oct dicomwrite.oct dicomlookup.oct dicomdisp.oct dicomanon.oct
...
$(need_dict): %.oct: %.cpp dicomdict.o
```
The result of this is that dicomdict.o symbols are present in multiple plugins, and the resulting program cleanup from this situation can go poorly, with errors such as "double free or corruption (!prev)" and other errors that you would expect to see with a corrupted heap.
If dlopen() order could be dictated so that the need_dict libs first had dicomdict.oct loaded first, paired with the "need_dict" plugins no longer being built with dicomdict.o, then octave programs using octave-dicom would be ok. It's not currently clear to me how that dlopen() order would be dictated.
original description follows
---
octave-dicom is currently FTBFS on all non-riscv64 arches, due to test failures. A double-free is happening, which causes a crash and fails the test suite.
Backporting this source to Ubuntu Mantic with modest packaging changes (reduce required dh-octave version) will pass the test suite.
5 tests, 5 passed, 0 known failure, 0 skipped
double free or corruption (!prev)
fatal: caught signal Aborted -- stopping myself...
Aborted (core dumped)
make: *** [debian/rules:5: binary] Error 134
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
summary: |
- octave-dicom FTBFS on !riscv64 due to test failure + octave-dicom: shared usage of dicomdict across plugins results in crash + on program exit |
Changed in gcc-13 (Ubuntu): | |
status: | New → Invalid |
description: | updated |
Changed in octave-dicom (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Dan Bungert (dbungert) |
Changed in octave-dicom (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in octave-dicom (Debian): | |
status: | Unknown → New |
Changed in octave-dicom (Debian): | |
status: | New → Confirmed |
I believe this to be a blocking issue for gcc-13, as britney wants to migrate both gcc-13 and octave-dicom at the same time (along with many other source packages).