Your message dated Mon, 04 Aug 2025 13:41:13 -0400
with message-id <[email protected]>
and subject line Closing bug
has caused the Debian Bug report #624465,
regarding gdb shows incorrect prototype in backtrace when using GCC's cleanup 
attribute
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
624465: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624465
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gdb
Version: 7.2-1
Severity: normal

gdb shows incorrect prototype in backtrace when using GCC's cleanup
attribute. Here's a simple example:

------------------------------------------------------------

#include <stdio.h>
#include <stdlib.h>

int fct (int *x, int y, int z)
{
  void log_cleanup (int *time)
  {
    fprintf (stderr, "x=%d\n", *x);
  }
  int log_time __attribute__ ((cleanup (log_cleanup)));

  *x = y;
  abort ();
  return 0;
}

int main (void)
{
  int x;

  fct (&x, 17, 1);
  return 0;
}

------------------------------------------------------------

$ gcc -Wall -g tst.c -o tst
$ gdb ./tst
GNU gdb (GDB) 7.2-debian
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/vlefevre/tst...done.
(gdb) run
Starting program: /home/vlefevre/tst 

Program received signal SIGABRT, Aborted.
0x00007ffff7aaf165 in raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
        in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) bt
#0  0x00007ffff7aaf165 in raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff7ab1f70 in abort () at abort.c:92
#2  0x00000000004005d9 in fct (y=17, z=1) at tst.c:13
#3  0x00000000004005f7 in main () at tst.c:21

One can see that the x is absent from fct in #2.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gdb depends on:
ii  gdbserver               7.2-1            The GNU Debugger (remote server)
ii  libc6                   2.11.2-13        Embedded GNU C Library: Shared lib
ii  libexpat1               2.0.1-7          XML parsing C library - runtime li
ii  libncurses5             5.9-1            shared libraries for terminal hand
ii  libpython2.6            2.6.6-10         Shared Python runtime library (ver
ii  libreadline6            6.2-1            GNU readline and history libraries
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

gdb recommends no packages.

Versions of packages gdb suggests:
ii  gdb-doc                       7.2-1      The GNU Debugger Documentation

-- no debconf information



--- End Message ---
--- Begin Message ---
I can't reproduce this on GDB 16.3:

--8<---------------cut here---------------start------------->8---
(gdb) bt
#0  0x00007ffff7e5995c in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff7e04cc2 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff7ded4ac in abort () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x0000555555555169 in fct (x=0x7fffffffeaac, y=17, z=1) at 1.c:13
#4  0x0000555555555187 in main () at 1.c:21
--8<---------------cut here---------------end--------------->8---

Closing the bug.

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to