Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 199002 - Some objects report negative addresses
Some objects report negative addresses
Product: Fedora
Classification: Fedora
Component: libxml2 (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Veillard
Depends On:
  Show dependency treegraph
Reported: 2006-07-15 11:28 EDT by Ralf Ertzinger
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-12-14 10:49:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch to make sure id() extraction is always positive (2.24 KB, patch)
2006-12-14 10:51 EST, Daniel Veillard
no flags Details | Diff

  None (edit)
Description Ralf Ertzinger 2006-07-15 11:28:01 EDT
Description of problem:
I am not sure where to place this, so feel free to reassign.

Consider the following python session:
>>> import libxml2
>>> import urllib2

>>> f = urllib2.urlopen("http://ryoko.camperquake.de")
>>> s = f.read()
>>> f.close()

>>> d = libxml2.parseDoc(s)
>>> d
<xmlDoc (None) object at 0x-48304c34>

As can be seen, python thinks that the object is located at a negative memory
address, which is kind of strange.

Version-Release number of selected component (if applicable):

How reproducible:
Sometimes, not all objects show this behaviour

Steps to Reproduce:
1. As seen above
Actual results:
Negative memory addresses show up sometimes

Expected results:
Non-negative addresses would be nice :)

Additional info:
Comment 1 Mihai Ibanescu 2006-07-16 23:26:11 EDT
This has been discussed extensively on the python-dev mailing list.


To summarize, one should not assume id() returns a short int, so using "%x" is
the wrong way to format the pointer's address.

Reassigning the bug to libxml2, since it doesn't look like the upstream
developers are willing to change id() in python 2.4.
Comment 3 Daniel Veillard 2006-12-14 10:49:47 EST
Bahh ... %X generating a negative string, you have to be a python 
maintainer to consider this sane, sigh ...

Comment 4 Daniel Veillard 2006-12-14 10:51:05 EST
Created attachment 143643 [details]
patch to make sure id() extraction is always positive

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