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 on invalid PostScript file #4

Open
sebastinas opened this issue Jul 6, 2021 · 7 comments
Open

Segfault on invalid PostScript file #4

sebastinas opened this issue Jul 6, 2021 · 7 comments
Labels
has attachment Attachment was not transfered from GitLab moreinfo

Comments

@sebastinas
Copy link
Member

On GitLab by @meator on Jul 6, 2021, 20:54


Hello, when I open sample.ps PostScript file in zatura and close zathura, zathura segfaults. I am using the 0.4.7 0.4.8 version of zathura.

Where does this file come from? I converted sample.pdf file via pdf2ps to the ps file. The PostScript file is invalid/corrupted.

Update: The 0.4.8 version has the same issue.

@sebastinas
Copy link
Member Author

I can view the file just fine. Do you have a backtrace of the crash?

@sebastinas
Copy link
Member Author

moved from zathura#238

@sebastinas
Copy link
Member Author

On GitLab by @meator on Jul 16, 2021, 18:21


Hello, thanks for the reply. I don't have a backtrace of the crash. How can I send You some information about the segfault?

@sebastinas
Copy link
Member Author

On GitLab by @meator on Jul 16, 2021, 21:09


The segfault occurs more often when I quit the .ps file while it is loading.

@sebastinas
Copy link
Member Author

First, disable the sandbox in your zathurarc via set sandbox none. Then start zathura under gdb with the offending file and make it crash, i.e., gdb --args zathura $path, then run.

@sebastinas
Copy link
Member Author

On GitLab by @meator on Jul 21, 2021, 10:22


> backtrace
#0  0x00007fffee68ce33 in ?? () from /usr/lib/libgs.so.9
#1  0x00007fffeeb9f1d3 in ?? () from /usr/lib/libgs.so.9
#2  0x00007fffeebd5bf3 in ?? () from /usr/lib/libgs.so.9
#3  0x00007fffeebd5851 in gx_default_transform_pixel_region () from /usr/lib/libgs.so.9
#4  0x00007fffeebf8cd3 in mem_transform_pixel_region () from /usr/lib/libgs.so.9
#5  0x00007fffeeb95e55 in ?? () from /usr/lib/libgs.so.9
#6  0x00007fffee5cf585 in ?? () from /usr/lib/libgs.so.9
#7  0x00007fffeebab5ec in gx_image1_plane_data () from /usr/lib/libgs.so.9
#8  0x00007fffeeb69df9 in gs_image_next_planes () from /usr/lib/libgs.so.9
#9  0x00007fffeec5c5cd in ?? () from /usr/lib/libgs.so.9
#10 0x00007fffeec289d5 in ?? () from /usr/lib/libgs.so.9
#11 0x00007fffeec29ff8 in gs_interpret () from /usr/lib/libgs.so.9
#12 0x00007fffeec1c3c7 in gs_main_run_string_continue () from /usr/lib/libgs.so.9
#13 0x00007fffeec21d6f in psapi_run_string_continue () from /usr/lib/libgs.so.9
#14 0x00007ffff444968d in ?? ()
#15 0x00007fffed09b228 in ?? ()
#16 0x00007fffed09b274 in ?? ()
#17 0x0000000000077d58 in ?? ()
#18 0x00007ffff4451104 in ?? ()
#19 0x00000000e00050a0 in ?? ()
#20 0xcacf6513f56cd300 in ?? ()
#21 0x000002530000034a in ?? ()
#22 0x00005555558ff370 in ?? ()
#23 0x00005555558dc620 in ?? ()
#24 0x00007fffe0001de0 in ?? ()
#25 0x0000000000000000 in ?? ()

I think that this is not what You want. Should I compile zathura and zathura-ps with debugging symbols to get more useful output from gdb? And if yes, how can I do that?

@sebastinas
Copy link
Member Author

Yes, and please also compile libgs with debugging symbols. That's where the crash happens. If your distribution offers the installation of debugging symbols or runs a server hosting the symbols for consumption by gdb, then that's the easiest options. Since I don't know which distro you are using, the best option is to check with their documentation or help channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has attachment Attachment was not transfered from GitLab moreinfo
Projects
None yet
Development

No branches or pull requests

1 participant