This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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 sanitizer/59286] segfault in __sanitizer::StackDepotGet


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59286

--- Comment #7 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
(In reply to Kostya Serebryany from comment #5)
> Maybe let's do some remote debugging then :) 

For the current setup, the crash is always in StackDepotGet

The following printfs:

    StackDesc *s = (StackDesc*)(v & ~1);
    printf("Getting %p\n",s);
    for (; s; s = s->link) {
      if (s->id == id) {
        *size = s->size;
        return s->stack;
      }
      printf("Following %p\n",s->link);
    }

Always crash at an output like:
Getting (nil)
Getting 0x7ffff0305eb0
Following 0xc004832c00002

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff0461100 (LWP 24991)]
0x00007ffff35ae4e0 in __sanitizer::StackDepotGet (id=4030474480, size=0x0) at
../../../../gcc/libsanitizer/sanitizer_common/sanitizer_stackdepot.cc:196
196          if (s->id == id) {
(gdb) print s
$2 = (__sanitizer::StackDesc *) 0xc004832c00002

so the s->link field containing something unexpected.


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