Bug 467246 - python-tidy: the bindings are not 64bit safe
python-tidy: the bindings are not 64bit safe
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: python-tidy (Show other bugs)
9
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Terje Røsten
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-16 10:54 EDT by Jose Pedro Oliveira
Modified: 2008-10-30 08:50 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-30 08:49:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fixes the pointer truncation (396 bytes, patch)
2008-10-16 10:58 EDT, Jose Pedro Oliveira
no flags Details | Diff

  None (edit)
Description Jose Pedro Oliveira 2008-10-16 10:54:08 EDT
Description of problem:
The tidy python bindings aren't 64bit safes and cause segmentation faults under Apache/mod_python or Apache/mod_wsgi. 

Version-Release number of selected component (if applicable):
python-tidy-0.2-3

How reproducible:
Everytime that a mod_python (or mod_wsgi) script is executed.


Steps to Reproduce and Patch:

See the following tickets:
 * https://bugzilla.redhat.com/show_bug.cgi?id=466069
 * https://sourceforge.net/tracker2/index.php?func=detail&aid=2154022&group_id=27659&atid=390963
Comment 1 Jose Pedro Oliveira 2008-10-16 10:58:46 EDT
Created attachment 320563 [details]
Fixes the pointer truncation

This one-line patch fixes the pointer truncation and works for me in both 32 and 64 bit systems.
Comment 2 Jose Pedro Oliveira 2008-10-16 11:07:09 EDT
Changed the platform to x86_64 (but it mostly likely affects other 64bit systems)
Comment 3 Jose Pedro Oliveira 2008-10-16 11:12:29 EDT
One of the tidy maintainers also mentions an interface change that was made in 2006 that hasn't been synced into utidylib (the utidylib code is from 2004).

See the Arnaud's comments in the sourceforge tidy ticket mentioned above.
Comment 4 Jose Pedro Oliveira 2008-10-16 11:39:37 EDT
Bug report against utidylib:

* [ Bug #14691 ] bindings aren't 64bit safe
  http://developer.berlios.de/bugs/?func=detailbug&bug_id=14691&group_id=1810
Comment 5 Fedora Update System 2008-10-18 14:14:34 EDT
python-tidy-0.2-4.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/python-tidy-0.2-4.fc9
Comment 6 Fedora Update System 2008-10-18 14:14:37 EDT
python-tidy-0.2-4.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/python-tidy-0.2-4.fc8
Comment 7 Terje Røsten 2008-10-18 14:17:39 EDT
Thanks for the nice report!
Comment 8 Jose Pedro Oliveira 2008-10-18 22:56:58 EDT
Thanks for the new package release.

I still haven't looked up much into the 2006 tidy interface change
(http://tidy.cvs.sourceforge.net/viewvc/tidy/tidy/include/tidy.h?r1=1.14&r2=1.15)
mentioned in the sourceforge ticket.  Nevertheless I believe the "sinkData" field of the class _OuputSink needs to be modified (most likely to ctypes.POINTER(ctypes.c_void_p) )


Current definition:
...
class _OutputSink(ctypes.Structure):
    _fields_=[("sinkData", ctypes.c_int),
              ("putByte", PUTBYTEFUNC),
              ]
...
Comment 9 Jose Pedro Oliveira 2008-10-26 14:22:49 EDT
The messages in comments #5 and #6 are misleading: the new python-tidy packages have been submitted for *update testing* and not for update.
Comment 10 Fedora Update System 2008-10-30 08:49:51 EDT
python-tidy-0.2-4.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 11 Fedora Update System 2008-10-30 08:50:13 EDT
python-tidy-0.2-4.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.