You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SVG with linearGradient crashes libcairo in latest prebuilt Linux binaries #1895
I can reproduce this. The backtrace suggests there's an invalid free within libcairo.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff7a67535 in __GI_abort () at abort.c:79
#2 0x00007ffff7ace726 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff7bf4952 "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#3 0x00007ffff7ad559a in malloc_printerr (str=str@entry=0x7ffff7bf2a9b "free(): invalid pointer") at malloc.c:5352
#4 0x00007ffff7ad73cc in _int_free (av=<optimised out>, p=<optimised out>, have_lock=<optimised out>) at malloc.c:4181
#5 0x00007fffdd6e40e5 in ?? () from /sharp/build/Release/../../vendor/lib/libcairo.so.2
#6 0x00007fffdd6e6e16 in ?? () from /sharp/build/Release/../../vendor/lib/libcairo.so.2
#7 0x00007fffdd74c8c0 in ?? () from /sharp/build/Release/../../vendor/lib/libcairo.so.2
#8 0x00007fffdd6f0375 in ?? () from /sharp/build/Release/../../vendor/lib/libcairo.so.2
#9 0x00007fffdd6e8c49 in ?? () from /sharp/build/Release/../../vendor/lib/libcairo.so.2
#10 0x00007fffdd75ccba in cairo_fill () from /sharp/build/Release/../../vendor/lib/libcairo.so.2
#11 0x00007fffde08b0e0 in ?? () from /sharp/build/Release/../../vendor/lib/librsvg-2.so.2
The prebuilt binaries currently provide cairo v1.17.2 for Linux and v1.16.0 for OS X, so my best guess would be a recent regression to libcairo or in librsvg's use of it.
changed the title [-]SVG causes core dump on Ubuntu 19.04[/-][+]SVG with linearGradient crashes libcairo in latest prebuilt Linux binaries[/+]on Oct 2, 2019
So we have to wait for the next release of libcairo then? Judging by their release notes this could take a while. For now we identified just this single SVG causing this after using sharp for months now on our site (https://cilng.com) which allows users to upload images and bookmark pages for which in turn thumbnails are generated.
For now it is not a huge problem for us, so we'll wait.
Activity
lovell commentedon Oct 1, 2019
I can reproduce this. The backtrace suggests there's an invalid free within libcairo.
The prebuilt binaries currently provide cairo v1.17.2 for Linux and v1.16.0 for OS X, so my best guess would be a recent regression to libcairo or in librsvg's use of it.
The main changes between these two versions are detailed at https://www.cairographics.org/news/cairo-1.17.2/
If I remove the
<linearGradient>element from the example SVG it does not crash.lovell commentedon Oct 2, 2019
This is caused by https://gitlab.freedesktop.org/cairo/cairo/issues/358 and was introduced in libcairo v1.17.2, which is still the most recent release.
[-]SVG causes core dump on Ubuntu 19.04[/-][+]SVG with linearGradient crashes libcairo in latest prebuilt Linux binaries[/+]flunderpero commentedon Oct 2, 2019
First of all - wow, you are quick! Thank you.
So we have to wait for the next release of libcairo then? Judging by their release notes this could take a while. For now we identified just this single SVG causing this after using sharp for months now on our site (https://cilng.com) which allows users to upload images and bookmark pages for which in turn thumbnails are generated.
For now it is not a huge problem for us, so we'll wait.
lovell commentedon Jan 16, 2020
v0.24.0 is now available with a prebuilt libvips v8.9.0 and cairo v1.16.0. Thanks for reporting this!