public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/31348] New: Launching the floor() and the ceil() functions under the print command breaks the software
@ 2024-02-06 21:23 abdallah93.as at gmail dot com
  2024-02-07  1:23 ` [Bug gdb/31348] " tromey at sourceware dot org
  2024-02-07  6:34 ` abdallah93.as at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: abdallah93.as at gmail dot com @ 2024-02-06 21:23 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31348

            Bug ID: 31348
           Summary: Launching the floor() and the ceil() functions under
                    the print command breaks the software
           Product: gdb
           Version: 12.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: abdallah93.as at gmail dot com
  Target Milestone: ---

The prompt is shown in interactive mode in which I type "p floor(3.1)" when I
am debugging a C binary compiled with the -g flag


////////////////////////////////////////////////////////////

(gdb) p floor(3.1)


Fatal signal: Segmentation fault
----- Backtrace -----
0x55c6174f0077 ???
0x55c6175f2859 ???
0x55c6175f2a22 ???
0x7f7654c4251f ???
        ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x55c6174a0020 ???
0x55c617647637 ???
0x55c6175f024a ???
0x55c6175ec827 ???
0x55c61770f79f ???
0x55c61770fcef ???
0x55c617525654 ???
0x55c61781b394 ???
0x55c6175f39a4 ???
0x55c6175f3d43 ???
0x55c6175f44c6 ???
0x7f7656004e0d ???
0x55c6175f2a95 ???
0x55c6175f4374 ???
0x55c6175f268b ???
0x55c6179a4815 ???
0x55c6179a4caa ???
0x55c6176b036c ???
0x55c6176b2054 ???
0x55c61744815f ???
0x7f7654c29d8f __libc_start_call_main
        ../sysdeps/nptl/libc_start_call_main.h:58
0x7f7654c29e3f __libc_start_main_impl
        ../csu/libc-start.c:392
0x55c61744dbf4 ???
0xffffffffffffffff ???
---------------------
A fatal error internal to GDB has been detected, further
debugging is not possible.  GDB will now terminate.

This is a bug, please report it.  For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.

Segmentation fault (core dumped)



////////////////////////////////////////////////////////

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gdb/31348] Launching the floor() and the ceil() functions under the print command breaks the software
  2024-02-06 21:23 [Bug gdb/31348] New: Launching the floor() and the ceil() functions under the print command breaks the software abdallah93.as at gmail dot com
@ 2024-02-07  1:23 ` tromey at sourceware dot org
  2024-02-07  6:34 ` abdallah93.as at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: tromey at sourceware dot org @ 2024-02-07  1:23 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31348

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-02-07
                 CC|                            |tromey at sourceware dot org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
I can't reproduce using gdb 13 on x86-64 fedora 38.

You didn't specify what system you are on.
Could you say?
And can you try a newer gdb?  The latest is gdb 14.

Normally calling libm functions is a bit of a pain
because there is no debuginfo.  So I get:

(gdb) p floor(3.1)
'__floor_sse41' has unknown return type; cast the call to its declared return
type


Adding the cast makes it work

(gdb) p (double) floor(3.1)
$2 = 3

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gdb/31348] Launching the floor() and the ceil() functions under the print command breaks the software
  2024-02-06 21:23 [Bug gdb/31348] New: Launching the floor() and the ceil() functions under the print command breaks the software abdallah93.as at gmail dot com
  2024-02-07  1:23 ` [Bug gdb/31348] " tromey at sourceware dot org
@ 2024-02-07  6:34 ` abdallah93.as at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: abdallah93.as at gmail dot com @ 2024-02-07  6:34 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31348

Abdallah Sheikh <abdallah93.as at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|WAITING                     |RESOLVED

--- Comment #2 from Abdallah Sheikh <abdallah93.as at gmail dot com> ---
Hi Tom, I am running Ubunutu 22.04 gnome desktop environment, with linux kernel
(6.5.0-14-generic), and of course on an x86-64 architecture.

I did as you said and built the gdb 14.1 from source, and reran trying to
reproduce the problem, but it seems that this problem no longer occurs in the
newer releases.

So I guess this is specific to gdb version 12.1, and maybe even some earlier
releases

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-07  6:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-06 21:23 [Bug gdb/31348] New: Launching the floor() and the ceil() functions under the print command breaks the software abdallah93.as at gmail dot com
2024-02-07  1:23 ` [Bug gdb/31348] " tromey at sourceware dot org
2024-02-07  6:34 ` abdallah93.as at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).