public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27006] New: Segmentation fault when using gdb command 'call'
@ 2020-12-03 11:29 1in.lang at seznam dot cz
  2020-12-03 13:35 ` [Bug c++/27006] " simark at simark dot ca
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: 1in.lang at seznam dot cz @ 2020-12-03 11:29 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 27006
           Summary: Segmentation fault when using gdb command 'call'
           Product: gdb
           Version: 10.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: 1in.lang at seznam dot cz
  Target Milestone: ---

When calling object method from gdb command line using the command 'call' the
debugger stops on a Segmentation fault which occurs in the called method.

It seems that the argument 'this' is passed to the method wrongly (see the
example bellow).

The bug is in gdb 10.1 new (in versions 8.2 and 9.1 it worked fine).
The bug is present in both 32-bit and 64-bit versions of gdb 10.1.

The problem can be reproduced e.g. by calling a method over an Eigen matrix,
see the error message from gdb command line when calling method 'col' for the
Eigem matrix 'pom'. (Note: see the value of the parameter 'this')

call pom.col(1)
Thread 33 received signal SIGSEGV, Segmentation fault.
0x1008a494 in Eigen::DenseStorage<double, -1, -1, -1, 0>::rows (this=0x1) at
C:/motion_gmc/SDK/libs/eigen/Eigen/src/Core/DenseStorage.h:394
394         EIGEN_DEVICE_FUNC Index rows(void) const {return m_rows;}
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function
(Eigen::DenseBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >::col(long)) will
be abandoned.
When the function is done executing, GDB will silently stop.

--- older versions of gdb return the matrix column correctly.

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

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

end of thread, other threads:[~2020-12-07 14:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 11:29 [Bug c++/27006] New: Segmentation fault when using gdb command 'call' 1in.lang at seznam dot cz
2020-12-03 13:35 ` [Bug c++/27006] " simark at simark dot ca
2020-12-03 16:34 ` ssbssa at sourceware dot org
2020-12-04 15:55 ` 1in.lang at seznam dot cz
2020-12-07 13:51 ` 1in.lang at seznam dot cz
2020-12-07 13:52 ` 1in.lang at seznam dot cz
2020-12-07 14:17 ` simark at simark dot ca
2020-12-07 14:43 ` 1in.lang at seznam dot cz
2020-12-07 14:48 ` simark at simark dot ca

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).