NetBSD-Bugs archive

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

RE: lib/54272: libedit segfaults on Linux aarch64 build



On Jun 7,  2:40pm, Mitchell.Felton%wdc.com@localhost (Mitch Felton) wrote:
-- Subject: RE: lib/54272: libedit segfaults on Linux aarch64 build

| I spent some more time debugging this today and you are correct that my fix=
|  is wrong. It looks like the tgetstr() call that you mentioned is returning=
|  a pointer to invalid memory. Here's the signature of tgetstr():
|     char *tgetstr(char *id, char **area);
| The difference between a good run on my x86_64 system and a bad run on my a=
| arch64 system seems to be that the return pointer has the upper 16 bits all=
|  set (0xffff000000000000). For example, it returns 0xfffffffff89b7fa7 inste=
| ad of 0xfffff89b7fa7 (which is a pointer to the area buffer that it updated=
| ). So it appears that this is in fact a problem somewhere in tgetstr() and =
| not with libedit.

Thanks Mitch, I would suggest running this with valgrind or turning on
the address sanitizer on gcc... Although you might need compile ncurses
with it, so valgrind is probably easier.

christos


Home | Main Index | Thread Index | Old Index