pwmt / zathura

Document viewer
https://pwmt.org/projects/zathura
zlib License
1.86k stars 127 forks source link

Crashes with: *** stack smashing detected ***: terminated on i686 #592

Closed mtboehlke closed 3 weeks ago

mtboehlke commented 3 weeks ago

After upgrading zathura to 0.5.6, zathura fails to open any document, instead crashing with *** stack smashing detected ***: terminated Aborted For context, I am running Void Linux on i686 with zathura installed through the system package manager. It doesn't seem to matter which pdf plugin is used. I also tested opening djvu file with the same result.

I did have a chance to run a git bisect. The earliest problematic commit was 5447de8a4701aec496638486e02ebf6acae7bb45.

Here is the backtrace from gdb:

#0  0xb7fc8579 in __kernel_vsyscall ()
#1  0xb6c95a27 in __pthread_kill_implementation (threadid=threadid@entry=3054538112, signo=signo@entry=6, 
    no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:43
#2  0xb6c95a9b in __pthread_kill_internal (signo=6, threadid=3054538112) at ./nptl/pthread_kill.c:78
#3  0xb6c3db27 in __GI_raise (sig=6) at ../sysdeps/posix/raise.c:26
#4  0xb6c23274 in __GI_abort () at ./stdlib/abort.c:79
#5  0xb6c242c1 in __libc_message_impl (fmt=<optimized out>, fmt@entry=0xb6de0543 "*** %s ***: terminated\n")
    at ../sysdeps/posix/libc_fatal.c:132
#6  0xb6d44f25 in __GI___fortify_fail (msg=msg@entry=0xb6de055b "stack smashing detected") at ./debug/fortify_fail.c:24
#7  0xb6d45f5d in __stack_chk_fail () at ./debug/stack_chk_fail.c:24
#8  0x004366c4 in __stack_chk_fail_local ()
#9  0x00433ded in parse_first_page_column_list.constprop.0 (first_page_column_list=<optimized out>, 
    size=size@entry=0xbffff478) at ../zathura/utils.c:307
#10 0x0041b004 in find_first_page_column (pages_per_row=1, first_page_column_list=<optimized out>) at ../zathura/utils.c:319
#11 find_first_page_column (first_page_column_list=<optimized out>, pages_per_row=1) at ../zathura/utils.c:310
#12 0x004236d3 in document_open (zathura=zathura@entry=0x4cdd90, path=path@entry=0x480890 "/tmp/recipe.pdf", 
    uri=uri@entry=0x0, password=0x0, page_number=<optimized out>, file_info_p=0x0) at ../zathura/zathura.c:1278
#13 0x00424ac1 in document_info_open (data=0x58d900) at ../zathura/zathura.c:865
#14 0xb752eede in ?? () from /usr/lib32/libgdk-3.so.0
#15 0xb708ad17 in ?? () from /usr/lib32/libglib-2.0.so.0
#16 0xb708e4a5 in ?? () from /usr/lib32/libglib-2.0.so.0
#17 0xb708ef8f in g_main_loop_run () from /usr/lib32/libglib-2.0.so.0
#18 0xb7800f45 in gtk_main () from /usr/lib32/libgtk-3.so.0
#19 0x0040b0fd in main (argc=<optimized out>, argv=<optimized out>) at ../zathura/main.c:335

Let me know if there is any other info I can provide.

sebastinas commented 3 weeks ago

Fixed in 0c344affeaaae5b1360d0958fb23b3481f63945c.

mtboehlke commented 3 weeks ago

Thanks for the quick response! Sorry I didn't stop to think that this may be already fixed.