Skip to content

gnu_get_libc_version() returns bad number on Ubuntu 64 bits #49104

Closed

Description

@smartini
mannequin
BPO 4854
Nosy @theller

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/theller'
closed_at = <Date 2009-01-06.03:41:25.906>
created_at = <Date 2009-01-06.01:18:44.776>
labels = ['ctypes', 'invalid']
title = 'gnu_get_libc_version() returns bad number on Ubuntu 64 bits'
updated_at = <Date 2009-01-06.03:41:25.905>
user = 'https://bugs.python.org/smartini'

bugs.python.org fields:

activity = <Date 2009-01-06.03:41:25.905>
actor = 'benjamin.peterson'
assignee = 'theller'
closed = True
closed_date = <Date 2009-01-06.03:41:25.906>
closer = 'benjamin.peterson'
components = ['ctypes']
creation = <Date 2009-01-06.01:18:44.776>
creator = 'smartini'
dependencies = []
files = []
hgrepos = []
issue_num = 4854
keywords = []
message_count = 2.0
messages = ['79223', '79226']
nosy_count = 2.0
nosy_names = ['theller', 'smartini']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue4854'
versions = ['Python 2.5']

Activity

  1. smartini commented on Jan 6, 2009

    smartinimannequin
    MannequinAuthor

    System: Ubuntu 8.10 Desktop AMD 64
    Processor: Intel Core i7
    Python: 2.5.2

    While raw C code:

    #include <gnu/libc-version.h>
    #include <stdlib.h>
    #include <stdio.h>
    
    int main(int argc, char *argv[]) {
      printf("GNU libc version: %s\n", gnu_get_libc_version());
      return 0;
    }

    prints:
    GNU libc version: 2.8.90

    Python ctypes seems to bug:
    $ python
    Python 2.5.2 (r252:60911, Oct  5 2008, 19:29:17) 
    [GCC 4.3.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import sys, ctypes, ctypes.util
    >>> sys.version
    '2.5.2 (r252:60911, Oct  5 2008, 19:29:17) \n[GCC 4.3.2]'
    >>> sys.platform
    'linux2'
    >>> LIBC = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c'))
    >>> LIBC
    <CDLL 'libc.so.6', handle 7f6d83122958 at 7f6d82fe8210>
    >>> LIBC.gnu_get_libc_version()
    -2109473701
  2. smartini commented on Jan 6, 2009

    smartinimannequin
    MannequinAuthor

    Ooops, my mistake, there is nothing wrong, this report can be closed, sorry.

  3. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions