FreeBSD Bugzilla – Attachment 260611 Details for
Bug 286439
textproc/libxml2 local port patch causes random x11/mate-terminal build failures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to fix random py-libxml2 SEGFAULT
libxml2fix (text/plain), 1.80 KB, created by
Don Lewis
on 2025-05-21 22:12:27 UTC
(
hide
)
Description:
patch to fix random py-libxml2 SEGFAULT
Filename:
MIME Type:
Creator:
Don Lewis
Created:
2025-05-21 22:12:27 UTC
Size:
1.80 KB
patch
obsolete
>diff --git a/textproc/libxml2/files/patch-python_libxml.c b/textproc/libxml2/files/patch-python_libxml.c >deleted file mode 100644 >index 7bbc98d75033..000000000000 >--- a/textproc/libxml2/files/patch-python_libxml.c >+++ /dev/null >@@ -1,35 +0,0 @@ >---- python/libxml.c.orig 2023-08-11 20:30:35 UTC >-+++ python/libxml.c >-@@ -1606,12 +1606,19 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, >- PyObject *message; >- PyObject *result; >- char str[1000]; >-+ unsigned char *ptr = (unsigned char *)str; >- >- #ifdef DEBUG_ERROR >- printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg); >- #endif >- >-+#if PY_MAJOR_VERSION >= 3 >-+ /* Ensure the error string doesn't start at UTF8 continuation. */ >-+ while (*ptr && (*ptr & 0xc0) == 0x80) >-+ ptr++; >-+#endif >- >-+ >- if (libxml_xmlPythonErrorFuncHandler == NULL) { >- va_start(ap, msg); >- vfprintf(stderr, msg, ap); >-@@ -1625,9 +1632,11 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, >- list = PyTuple_New(2); >- PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt); >- Py_XINCREF(libxml_xmlPythonErrorFuncCtxt); >-- message = libxml_charPtrConstWrap(str); >-+ message = libxml_charPtrConstWrap(ptr); >- PyTuple_SetItem(list, 1, message); >- result = PyObject_CallObject(libxml_xmlPythonErrorFuncHandler, list); >-+ /* Forget any errors caused in the error handler. */ >-+ PyErr_Clear(); >- Py_XDECREF(list); >- Py_XDECREF(result); >- } >diff --git a/textproc/py-libxml2/Makefile b/textproc/py-libxml2/Makefile >index 84796bac21b3..7633fdebb4a1 100644 >--- a/textproc/py-libxml2/Makefile >+++ b/textproc/py-libxml2/Makefile >@@ -1,4 +1,4 @@ >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= textproc gnome python > PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
truckman
:
maintainer-approval?
(
desktop
)
Actions:
View
|
Diff
Attachments on
bug 286439
:
260608
| 260611 |
260665