This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/20182] New: internal-error: resume: Assertion `pc_in_thread_step_range (pc, tp)' failed.


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

            Bug ID: 20182
           Summary: internal-error: resume: Assertion
                    `pc_in_thread_step_range (pc, tp)' failed.
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: clement.pit at gmail dot com
  Target Milestone: ---

Created attachment 9299
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9299&action=edit
Binary corresponding to the test.c listing

Hi,

I don;t have much experience using GDB, so apologies if this is not detailed
enough.

Assume the following program as test.c

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

int main() {
  char* line = NULL;
  size_t len = 0;
  ssize_t read;

  FILE* file = fopen("blah", "r");

  while ((read = getline(&line, &len, file)) != -1) {
    printf("%s\n", line); printf("> %s\n", line); printf(">> %s\n", line);
  }

  fclose(file);
  free(line);

  return 1;
}

With input in a file "blah" containing the following:

line0
line1
line2
line3
line4
line5
line6
line7
line8
line9
line10
line11
line12
line13
line14
line15
line16
line17
line18
line19
line20
line21
line22
line23
line24
line25
line26
line27
line28

Compile this file using "make -k CFLAGS='-ggdb' test", then run "gdb test".
Pasting the following sequence of commands in the terminal produces the message
above: 

start
next 1
next 1
next 1
next 1
next 1
next 1
step 1
step 1
step 1
next 1
next 1
next 1
next 1
next 1
next 1
up 1
up 1
next 1
next 1
next 1
up 1
up 1
next 1
up 1
up 1
up 1
up 1
up 1
up 1
up 1
up 1
up 1
up 1
until

More precisely, the final few lines are as follows:

(gdb) until
/build/buildd/gdb-7.7.1/gdb/infrun.c:1948: internal-error: resume: Assertion
`pc_in_thread_step_range (pc, tp)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y
/build/buildd/gdb-7.7.1/gdb/infrun.c:1948: internal-error: resume: Assertion
`pc_in_thread_step_range (pc, tp)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) y
Aborted (core dumped)

I'm attaching the binary produced by make. Some version information:

$ gdb -v
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1

Let me know if I can provide more info, including possibly the full coredump.

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]