Bug 132035
Summary: | rpcgen -h hangs | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | mike eisler <mike> |
Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED UPSTREAM | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 2 | CC: | drepper |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-09-28 02:59:41 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
mike eisler
2004-09-07 23:51:29 UTC
The issue with pipes was a red herring. Fixing the pipe handling by closing the redundant descriptor didn't change anything. Debugging with gdb, we see that the problem is an infinite loop in isvectordef(): int isvectordef (const char *type, relation rel) { definition *def; for (;;) { switch (rel) { case REL_VECTOR: return !streq (type, "string"); case REL_ARRAY: return 0; case REL_POINTER: return 0; case REL_ALIAS: def = findval (defined, type, typedefed); if (def == NULL) { return 0; } type = def->def.ty.old_type; rel = def->def.ty.rel; } } } This loop never returns because of these two typedefs in the NFSv4 .x file: typedef hyper int64_t; typedef unsigned hyper uint64_t; The problem is that, unlike the Solaris rpcgen, the base native C types the GNU rpcgen uses for hyper are int64_t and uint64_t (Solaris uses longlong_t and ulonglong_t). Thus findval(,"int64_t",) always returs a definition that has def.def.ty.old_type equal to type. One fix would be to change the native types to "long long", but browsing the header files, apparently there is a concern that some compilers don't have "long long" support. Instead, I was able to cure the infinite loop by adding this after the switch (){} block: #if 1 if (strcmp(type, def->def.ty.old_type) == 0) { return 0; } #endif I also changed print_datadef() to suppress the emission of the function prototype for xdr_int64_t() since that is already in /usr/include/rpc/xdr_int64_t: if (def->def_kind != DEF_PROGRAM && def->def_kind != DEF_CONST) { #if 1 if (def->def_kind == DEF_TYPEDEF && strcmp(def->def_name, def->def.ty.old_type) == 0) { return; } #endif storexdrfuncdecl(def->def_name, def->def_kind != DEF_TYPEDEF || !isvectordef(def->def.ty.old_type, def->def.ty.rel)); } I haven't put this fix through all its paces, such has trying out the -a option. In any case the analysis doesn't give an indication for the workaround: do not use .x files that define a typedef that conflicts with a "core" rpcgen type. I've fixed this differently. The changes are in upstream CVS and will probably be in the next FC3 glibc binary. |