Project

General

Profile

Actions

Bug #1420

closed

uatomic/generic.h uses abort() without including stdlib.h

Added by Chris Hofstaedtler 23 days ago. Updated 22 days ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
02/17/2025
Due date:
% Done:

0%

Estimated time:

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!

Actions #1

Updated by Kienan Stewart 23 days ago

  • Assignee set to Kienan Stewart

Hi Chris,

thanks for the report! I'll take a look at this.

kienan

Actions #2

Updated by Kienan Stewart 23 days 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

Actions #3

Updated by Chris Hofstaedtler 23 days 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

Actions #4

Updated by Kienan Stewart 22 days 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

Actions #5

Updated by Chris Hofstaedtler 22 days 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!

Actions

Also available in: Atom PDF