pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/46190: pkgsrc-2011Q4 - misc/rlwrap - Segfaults on amd64 - odd gdb results



The following reply was made to PR pkg/46190; it has been noted by GNATS.

From: Matthew Mondor <mm_lists%pulsar-zone.net@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/46190: pkgsrc-2011Q4 - misc/rlwrap - Segfaults on amd64 -
 odd gdb results
Date: Tue, 13 Mar 2012 23:25:18 -0400

 Obviously tget.c was buggy.  The following still yields the same
 results, though.
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <termcap.h>
 
 int     main(void);
 
 int
 main(void)
 {
         char    str[2048], *tb = str, *cap;
 
         cap = tgetstr("le", &tb);
         (void) printf("cap = %p\n", cap);
         if (cap != NULL)
                 (void) printf("cap = %s\n", cap);
         (void) printf("tb = %p\n", tb);
         if (tb != NULL)
                 (void) printf("*tb = 0x%02x\n", *tb);
 
         return 0;
 }
 
 ninja$ ./tget
 cap = 0x0
 tb = 0x7f7fffffd220
 *tb = 0x05
 
 -- 
 Matt
 


Home | Main Index | Thread Index | Old Index