Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault when displaying fontawesome characters #5

Closed
ghost opened this issue Apr 6, 2020 · 6 comments
Closed

Segfault when displaying fontawesome characters #5

ghost opened this issue Apr 6, 2020 · 6 comments
Assignees

Comments

@ghost
Copy link

ghost commented Apr 6, 2020

When opening a file with vim that contains certain fontawesome characters (I made an example for which this occurs with), st segfaults, but only with this patch.
This is the stacktrace I get when I enable the clang undefined behaviour sanitizer:

UndefinedBehaviorSanitizer:DEADLYSIGNAL
==26288==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x6e306c548000 (pc 0x6e306d33a88a bp 0x000000000000 sp 0x7156c7185380 T26288)
==26288==The signal is caused by a READ memory access.
    #0 0x6e306d33a889  (/usr/lib/libharfbuzz.so.0+0x28889)
    #1 0x6e306d3e134d  (/usr/lib/libharfbuzz.so.0+0xcf34d)
    #2 0x6e306d3dd762  (/usr/lib/libharfbuzz.so.0+0xcb762)
    #3 0x6e306d3de261 in hb_shape_plan_create_cached2 (/usr/lib/libharfbuzz.so.0+0xcc261)
    #4 0x6e306d3de4df in hb_shape_full (/usr/lib/libharfbuzz.so.0+0xcc4df)
    #5 0x68369877ff in hbtransformsegment /home/user/st/hb.c:114:2
    #6 0x68369867f7 in hbtransform /home/user/st/hb.c:64:4
    #7 0x683697b362 in xmakeglyphfontspecs /home/user/st/x.c:1344:2
    #8 0x68369799c3 in xdrawline /home/user/st/x.c:1614:13
    #9 0x6836970868 in draw /home/user/st/st.c:2588:2
    #10 0x6836980604 in run /home/user/st/x.c:1953:4
    #11 0x683697f34a in main /home/user/st/x.c:2059:2
    #12 0x6e306d132022 in __libc_start_main (/usr/lib/libc.so.6+0x27022)
    #13 0x6836947a1d in _start (/home/user/st/st+0x1aa1d)

UndefinedBehaviorSanitizer can not provide additional info.
==26288==ABORTING

These is the minimal file where this occured when opening with nvim file

龜

Edit: Sometimes this segfault doesn't happen until you quit out of vim.
Edit2: When you create this file in nvim in st, you have to restart st for this to occur.

@cog1to
Copy link
Owner

cog1to commented Apr 6, 2020

are you using font2 patch to display fontawesome icons?

@ghost
Copy link
Author

ghost commented Apr 6, 2020

No, and it doesn't show the second character at least, rather it just shows a wrong one but still works like that on unpatched st, this patch just makes it segfault sometimes.

@cog1to
Copy link
Owner

cog1to commented Apr 6, 2020

oh, gotcha. thanks.

@cog1to cog1to self-assigned this Apr 6, 2020
@cog1to
Copy link
Owner

cog1to commented Apr 6, 2020

Identified a problem. Will try to upload a fix later today.

@cog1to
Copy link
Owner

cog1to commented Apr 6, 2020

Should be fixed in master branch now. Can you verify?

@ghost
Copy link
Author

ghost commented Apr 6, 2020

Yeah, I cannot reproduce the segfault anymore.

@ghost ghost closed this as completed Apr 6, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant