yadifad crashes on start up
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
yadifa (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Compiler optimization bug generates wrong assembly causing SEGFAULT.
# apt -y install yadifa
---
# systemctl start yadifa
# systemctl status yadifa
× yadifa.service - YADIFA Domain Name Server
Loaded: loaded (/usr/lib/
Active: failed (Result: core-dump) since Fri 2024-06-07 12:30:24 UTC; 9min ago
Duration: 1.284s
Docs: man:yadifad(8)
Process: 240604 ExecStart=
Main PID: 240604 (code=dumped, signal=SEGV)
CPU: 274ms
Jun 07 12:30:22 ubuntu-2404 systemd[1]: Started yadifa.service - YADIFA Domain Name Server.
Jun 07 12:30:24 ubuntu-2404 systemd[1]: yadifa.service: Main process exited, code=dumped, status=11/SEGV
Jun 07 12:30:24 ubuntu-2404 systemd[1]: yadifa.service: Failed with result 'core-dump'.
---
# /usr/sbin/yadifad
Segmentation fault (core dumped)
---
# apt-cache policy yadifa
yadifa:
Installed: 2.6.5-1build2
Candidate: 2.6.5-1build2
Version table:
*** 2.6.5-1build2 500
500 http://
100 /var/lib/
---
# lsb_release -rd
No LSB modules are available.
Description: Ubuntu 24.04 LTS
Release: 24.04
---
Suggested workaround by disabling lto in debian/rules (confirmed locally)
"DEB_BUILD_
This bug is specific for ubuntu 24.04 (gcc 13.2). It does not affect ubuntu 22.04 or Debian 12 (gcc 12.2).
Root cause (credit Richard Biener) https:/ /gcc.gnu. org/bugzilla/ show_bug. cgi?id= 115432
struct file_output_stream
{
union
{
void *voidp;
int fd;
} data;
const output_stream_vtbl* vtbl;
};
struct output_stream
{
void* data;
const output_stream_vtbl* vtbl;
};
those are two unrelated types. Doing
((file_ output_ stream *)p)->vtbl = x;
... = ((output_stream *)p)->vtbl;
is invoking undefined behavior (unless -fno-strict- aliasing) .