bug#43409: 28.0.50; Segfault on non-UTF-8 path

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#43409: 28.0.50; Segfault on non-UTF-8 path

Lars Ingebrigtsen

On Debian bullseye, with a file looking like this in a dired buffer:



Hitting RET on that kills Emacs.  Running under gdb, I get this
backtrace:

#0  terminate_due_to_signal
    (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=40) at emacs.c:378
#1  0x00005555555984fe in emacs_abort () at sysdep.c:2280
#2  0x0000555555596a9a in multibyte_chars_in_text (ptr=<optimized out>,
    ptr@entry=0x5555565f0870 "f\363o", nbytes=nbytes@entry=3)
    at character.c:447
#3  0x00005555555d412b in display_mode_element
    (it=<optimized out>, depth=<optimized out>, field_width=<optimized out>, precision=<optimized out>, elt=<optimized out>, props=<optimized out>, risky=<optimized out>) at xdisp.c:25644
#4  0x00005555555d54b0 in display_mode_element
    (it=0x7fffffffb840, depth=2, field_width=-1, precision=-1, elt=<optimized out>, props=XIL(0), risky=<optimized out>) at lisp.h:1423
#5  0x00005555555d63c2 in gui_consider_frame_title (frame=XIL(0x555555f64c45))
    at lisp.h:1007
#6  0x00005555555e15d9 in prepare_menu_bars () at xdisp.c:12666
#7  redisplay_internal () at xdisp.c:15514
#8  0x000055555568baeb in read_char
    (commandflag=1, map=XIL(0x5555563fb2b3), prev_event=XIL(0), used_mouse_menu=0x7fffffffe52b, end_time=0x0) at keyboard.c:2493
#9  0x000055555568e9c4 in read_key_sequence
    (keybuf=<optimized out>, prompt=XIL(0), dont_downcase_last=<optimized out>, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=<optimized out>) at keyboard.c:9547
#10 0x000055555569034c in command_loop_1 () at lisp.h:1007
#11 0x00005555556fbf17 in internal_condition_case
    (bfun=bfun@entry=0x555555690170 <command_loop_1>, handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x555555686ad0 <cmd_error>) at eval.c:1356
#12 0x0000555555681504 in command_loop_2 (ignore=ignore@entry=XIL(0))
    at lisp.h:1007
#13 0x00005555556fbe71 in internal_catch
    (tag=tag@entry=XIL(0xd200), func=func@entry=0x5555556814e0 <command_loop_2>, arg=arg@entry=XIL(0)) at eval.c:1117
#14 0x00005555556814ab in command_loop () at lisp.h:1007
#15 0x00005555556866e6 in recursive_edit_1 () at keyboard.c:714
#16 0x0000555555686a12 in Frecursive_edit () at keyboard.c:786
#17 0x000055555559fb54 in main (argc=2, argv=<optimized out>) at emacs.c:2047

This is with

[larsi@stories ~]$ echo $LANG
en_US.UTF-8



In GNU Emacs 28.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.24.22, cairo version 1.16.0)
 of 2020-09-14 built on stories
Repository revision: e408f2fab24ea81f74d9b84dc83ee67d562846dc
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Debian GNU/Linux bullseye/sid


--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: https://lars.ingebrigtsen.no


attachment0 (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#43409: 28.0.50; Segfault on non-UTF-8 path

Lars Ingebrigtsen
Eli Zaretskii <[hidden email]> writes:

> My bad, sorry: I used a wrong API for the job.  Does the below solve
> the problem?

Yup, that fixes the problem.

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



Reply | Threaded
Open this post in threaded view
|

bug#43409: 28.0.50; Segfault on non-UTF-8 path

Eli Zaretskii
> From: Lars Ingebrigtsen <[hidden email]>
> Cc: [hidden email]
> Date: Tue, 15 Sep 2020 17:12:08 +0200
>
> Eli Zaretskii <[hidden email]> writes:
>
> > My bad, sorry: I used a wrong API for the job.  Does the below solve
> > the problem?
>
> Yup, that fixes the problem.

Thanks, installed.