[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] solving a history bug in nano [patch]
From: |
Tito |
Subject: |
Re: [Nano-devel] solving a history bug in nano [patch] |
Date: |
Tue, 31 May 2016 22:05:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0 |
On 05/31/2016 08:02 PM, Benno Schulenberg wrote:
>
> On Tue, May 31, 2016, at 14:42, Tito wrote:
>> On 05/31/2016 10:20 AM, Benno Schulenberg wrote:
>>> Tito, did you try using ((~(size_t)0)>>1) instead of (size_t)-1?
>>
>> Yes works.
>
> Okay, then we have a fallback.
>
>>> Did you try running nano with gdb? I would still like to know why and
>>> where it segfaults for you.
>>
>> Program received signal SIGABRT, Aborted.
>
> Oh... But an Abort is not the same as a Segmentation fault.
> When you run nano outside of gdb, you get the same error
> message? "Aborted"?
No it says "Segmentation fault" without gdb.
>> 0x400c6548 in raise () from /lib/libc.so.6
>> (gdb) backtrace
>> #0 0x400c6548 in raise () from /lib/libc.so.6
>> #1 0x400c7b6c in abort () from /lib/libc.so.6
>> #2 0x400fe344 in __libc_message () from /lib/libc.so.6
>> #3 0x4010423c in malloc_printerr () from /lib/libc.so.6
>> #4 0x401043b8 in malloc_consolidate () from /lib/libc.so.6
>> #5 0x40106218 in _int_malloc () from /lib/libc.so.6
>> #6 0x40107878 in malloc () from /lib/libc.so.6
>> #7 0x00033d30 in nmalloc (howmuch=714) at utils.c:388
>> #8 0x0003847c in statusbar (msg=0x1 <Address 0x1 out of bounds>) at
>> winio.c:2126
>> #9 0x00028e9c in findnextstr (whole_word_only=false, begin=0xc91a0,
>> begin_x=0, needle=0x4e048 "prova", needle_len=0x0) at search.c:364
>
> Strange. Why would it go wrong in statusbar()? There are only two calls
> of statusbar() in findnextstr() -- I am looking at 2.5.3 now. The first
> shouldn't happen, because you don't cancel the search, so it must be the
> second. Anyway -- can you comment out both those calls (in search.c, line
> 290 and 364) and try the run in gdb again?
(gdb) backtrace
#0 0x40104368 in malloc_consolidate () from /lib/libc.so.6
#1 0x40106218 in _int_malloc () from /lib/libc.so.6
#2 0x40107878 in malloc () from /lib/libc.so.6
#3 0x00033d00 in nmalloc (howmuch=1920) at utils.c:388
#4 0x00037508 in display_string (buf=0xc9300 "pippo", start_col=0, len=62,
dollars=false) at winio.c:1777
#5 0x000283a0 in not_found_msg (str=0xc9300 "pippo") at search.c:93
#6 0x00028dc0 in findnextstr (whole_word_only=false, begin=0xc9c48, begin_x=0,
needle=0xc9300 "pippo", needle_len=0x0)
at search.c:333
#7 0x00029178 in do_search () at search.c:456
#8 0x00021544 in do_input (allow_funcs=true) at nano.c:1692
#9 0x000232b8 in main (argc=1, argv=0xbeb586a4) at nano.c:2652
> Can you also paste the output of 'locale' and 'stty size'?
locale
LANG=it_IT
LC_CTYPE="it_IT"
LC_NUMERIC=it_IT
LC_TIME=it_IT
LC_COLLATE="it_IT"
LC_MONETARY=it_IT
LC_MESSAGES=it_IT
LC_PAPER=it_IT
LC_NAME=it_IT
LC_ADDRESS=it_IT
LC_TELEPHONE=it_IT
LC_MEASUREMENT=it_IT
LC_IDENTIFICATION=it_IT
LC_ALL=
stty size (over ssh)
41 122
stty size (on the device)
14 60
> And can you try a run with 'LC_ALL=C LANGUAGE=en src/nano'?
Segmentation fault.
>
> Benno
>
Ciao,
Tito
- Re: [Nano-devel] solving a history bug in nano [patch], (continued)
- Re: [Nano-devel] solving a history bug in nano [patch], Tito, 2016/05/29
- Re: [Nano-devel] solving a history bug in nano [patch], Benno Schulenberg, 2016/05/29
- Re: [Nano-devel] solving a history bug in nano [patch], Tito, 2016/05/29
- Re: [Nano-devel] solving a history bug in nano [patch], Benno Schulenberg, 2016/05/30
- Re: [Nano-devel] solving a history bug in nano [patch], Tito, 2016/05/30
- Re: [Nano-devel] solving a history bug in nano [patch], alpha, 2016/05/30
- Re: [Nano-devel] solving a history bug in nano [patch], Tito, 2016/05/30
- Re: [Nano-devel] solving a history bug in nano [patch], Benno Schulenberg, 2016/05/31
- Re: [Nano-devel] solving a history bug in nano [patch], Tito, 2016/05/31
- Re: [Nano-devel] solving a history bug in nano [patch], Benno Schulenberg, 2016/05/31
- Re: [Nano-devel] solving a history bug in nano [patch],
Tito <=
- Re: [Nano-devel] solving a history bug in nano [patch], alpha, 2016/05/31
- Re: [Nano-devel] solving a history bug in nano [patch], Tito, 2016/05/31
- Re: [Nano-devel] solving a history bug in nano [patch], Tito, 2016/05/29