Bug #1420
closeduatomic/generic.h uses abort() without including stdlib.h
0%
Description
It appears gcc-14 (or maybe just Debian's gcc-14) defaults to -Werror=implicit-function-declaration. Building programs with liburcu 0.15.0 fails with that gcc due to:
In file included from /usr/include/powerpc64le-linux-gnu/urcu/uatomic/ppc.h:228,
from /usr/include/powerpc64le-linux-gnu/urcu/uatomic.h:73,
from lock.h:5,
from lock.c:1:
/usr/include/powerpc64le-linux-gnu/urcu/uatomic/generic.h: In function ‘_uatomic_and’:
/usr/include/powerpc64le-linux-gnu/urcu/uatomic/generic.h:422:24: error: implicit declaration of function ‘abort’ [-Wimplicit-function-declaration]
422 | oldt = uatomic_read((uint32_t *) addr);
| ^~~~~~~~~~~~
/usr/include/powerpc64le-linux-gnu/urcu/uatomic/generic.h:1:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘abort’
+++ |+#include <stdlib.h>
1 | // SPDX-FileCopyrightText: 1991-1994 by Xerox Corporation. All rights reserved.
Would be nice if this could be fixed upstream.
Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1097513
Thanks!
KS Updated by Kienan Stewart about 1 year ago
- Assignee set to Kienan Stewart
Hi Chris,
thanks for the report! I'll take a look at this.
kienan
KS Updated by Kienan Stewart about 1 year ago
- Status changed from New to Resolved
Hi again Chris,
this issue was fixed a few days ago and backported in the 0.15.0 branch: https://github.com/urcu/userspace-rcu/commit/19ae4fc7cb4ac65025778a71352ebe69478ee2ea
thanks,
kienan
CH Updated by Chris Hofstaedtler about 1 year ago
Hi kienan,
I didn't find the github repo earlier today. Thanks for looking into it and pointing me to the commit.
Best,
Chris
KS Updated by Kienan Stewart about 1 year ago
Hi Chris,
just to let you know that urcu 0.15.1 has been released with the fix if you prefer having a full tagged release.
thanks,
kienan
CH Updated by Chris Hofstaedtler about 1 year ago
Kienan Stewart wrote in #note-4:
just to let you know that urcu 0.15.1 has been released with the fix if you prefer having a full tagged release.
Thanks, it appears tagging it was helpful to Debian!