Bug 4633 - glibc headers break h2ph which causes infinite loops
Summary: glibc headers break h2ph which causes infinite loops
Status: CLOSED DUPLICATE of bug 2297
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: perl
Version: 6.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Crutcher Dunnavant
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-08-20 20:51 UTC by Chris Seawood
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-08-30 02:26:35 UTC

Attachments (Terms of Use)

Description Chris Seawood 1999-08-20 20:51:17 UTC
This problem has been noted in a couple of other bug reports
but they were for RH5.2 or not specific to this problem.

H2ph cannot handle the way that glibc embeds defines inside
enumerations. This code snippet from <bits/socket.h> shows
the cause of the problem:

enum __socket_type
  SOCK_STREAM = 1,              /* Sequenced, reliable,
                                   byte streams.  */
  SOCK_DGRAM = 2,               /* Connectionless,
unreliable datagrams
                                   of fixed maximum length.

Somehow, h2ph either misses the SOCK_STREAM = 1 or overrides
it with #define SOCK_STREAM SOCK_STREAM.  This causes the
subsequent bits/socket.ph to have the follow function:

eval 'sub SOCK_STREAM () { &SOCK_STREAM;}' unless

Which is obviously wrong and causes an infinite loop to
occur.  With some programs (aub was the only one I
explicitly tested), this causes perl eat memory and
eventually lock up the machine.

A brief glance at the srpm in rawhide shows that no patch
has been applied to h2ph so it probably won't fix this

Comment 1 Cristian Gafton 1999-08-30 02:26:59 UTC
*** This bug has been marked as a duplicate of 2297 ***

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