public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/26804] New: gdbserver crash at <init_cacheinfo+22> when program has canary and is 32 bit.
@ 2020-10-29  3:25 3480283348 at qq dot com
  2020-10-29 13:44 ` [Bug gdb/26804] " simark at simark dot ca
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: 3480283348 at qq dot com @ 2020-10-29  3:25 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 26804
           Summary: gdbserver crash at <init_cacheinfo+22> when program
                    has canary and is 32 bit.
           Product: gdb
           Version: 9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: 3480283348 at qq dot com
  Target Milestone: ---

here is my test program.
```
#include <stdio.h>
#include <stdlib.h>

void test()
{
    int a = 1;
    int buffer[128];
    printf("a = %d\n", a);
}

int main()
{
    test();
}
```

And compile this program as 32bit on x86_64.
```
gcc test.c -o test -g -m32
```

using gdb works fine. Then use gdbserver and gdb on local machine.
```
# terminal 01
gdbserver localhost:11111 test

# terminal 02
gdb
target remote localhost:11111
continue
```

Gdbserver will crash at <init_cacheinfo+22> which deal with canary.
```
Program received signal SIGSEGV, Segmentation fault.
0xf7dd9ce6 in init_cacheinfo () from target:/usr/lib32/libc.so.6
-> 0xf7dd9ce6 <init_cacheinfo+22> mov    eax, gs:0x14
-> $gs: 0x0063 
```

> OS: GUN/Linux x86_64

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

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

end of thread, other threads:[~2021-01-20 15:36 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29  3:25 [Bug gdb/26804] New: gdbserver crash at <init_cacheinfo+22> when program has canary and is 32 bit 3480283348 at qq dot com
2020-10-29 13:44 ` [Bug gdb/26804] " simark at simark dot ca
2020-11-06  7:11 ` 3480283348 at qq dot com
2020-11-12  6:59 ` 3480283348 at qq dot com
2020-12-02 16:46 ` vries at gcc dot gnu.org
2021-01-11 18:17 ` bp at alien8 dot de
2021-01-12 17:06 ` markus.t.metzger at intel dot com
2021-01-18 16:40 ` vries at gcc dot gnu.org
2021-01-19  7:12 ` vries at gcc dot gnu.org
2021-01-19  7:13 ` [Bug server/26804] " vries at gcc dot gnu.org
2021-01-19  7:37 ` markus.t.metzger at intel dot com
2021-01-19 12:40 ` markus.t.metzger at intel dot com
2021-01-19 12:50 ` vries at gcc dot gnu.org
2021-01-20 13:00 ` vries at gcc dot gnu.org
2021-01-20 15:35 ` vries at gcc dot gnu.org
2021-01-20 15:36 ` vries at gcc dot gnu.org

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