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
fontforge: PyFF_OpenFont(): fontforge killed by signal 6 #3042
Comments
|
This has been affecting build failure for Lohit series as well. |
|
I can't reproduce the crash on Ubuntu, but it seems to be happening on the free statement. Could you try attaching valgrind to see whether it complains about a double-free there? Do you get the problem if you compile from source locally? The Python documentation says that we are responsible for freeing a string from PyArg_ParseTuple, but it's customary to use PyMemFree instead of free. That might be a problem, but I don't know why it wouldn't surface anywhere else in our Python code. Do previous versions of FontForge work? |
|
I just found this issue can be similar of issue #2992. I need some time to test the fix and if found working will close this as duplicate. Thanks @frank-trampe for looking into this issue. |
|
@pnemade, I see that you pushed a patch to Fedora with the PyMem_Free change. Does that solve the problem? |
|
@frank-trampe I think so. I was testing gnu-free-fonts and its built fine but then I realized some other font package is still failing to build using fontforge python API. Hence, I changed many of the free() calls to PyMem_Free() and now those fonts are also building fine against fontforge. |
|
@gioele Yes this bug is fixed now and all the Fedora fonts builds also succeeded now. |
…ement This is also based on the discussion happened in upstream issue fontforge#2992 This commit is a fix for the reported two problems in issue fontforge#3042 The upstream documentation says PyArg_ParseTuple() will allocate a buffer of the needed size, copy the encoded data into this buffer and adjust *buffer to reference the newly allocated storage. The caller is responsible for calling PyMem_Free() to free the allocated buffer after use.
get any sfd file e.g. FreeSans.sfd from gnu-free-fonts upstream tarball or get it directly from here https://pnemade.fedorapeople.org/FreeSans.sfd
run following command
/usr/bin/fontfore -lang=py -script generate.ff FreeSans.sfd
This will cause core dump. I suspect issue somewhere in python3.6 version. I am getting this core dump on Fedora 26 system where we have fontforge-20161012-5.fc26.x86_64, python3-3.6.0-20.fc26.x86_64, gcc-7.0.1-0.10.fc26.x86_64 packages installed.
Truncated backtrace:
More information can be obtained from https://bugzilla.redhat.com/show_bug.cgi?id=1429574
The text was updated successfully, but these errors were encountered: