On Feb 15, 2011, at 7:18 PM, Mark Hatle wrote: > I'm currently using rpm-5.4.0, and I've encountered a few issues.. however > during this I'm trying to diagnose loading of certain files using --showrc. > But > when I do, I get a segfault. > > Looking at valgrind output I get: > > ==3492== Invalid read of size 8 > ==3492== at 0x53E862A: rpmioGetPool (rpmmalloc.c:223) > ==3492== by 0x4E73A9B: rpmdsGetPool (rpmds.c:196) > ==3492== by 0x4E76209: rpmdsMerge (rpmds.c:950) > ==3492== by 0x4E782B2: rpmdsRpmlib (rpmds.c:1567) > ==3492== by 0x4E88966: rpmShowRC (rpmrc.c:1243) >
There's one more peice that needs doing on "rpm -v --showrc" ==32637== 1 errors in context 1 of 2: ==32637== Invalid free() / delete / delete[] ==32637== at 0x423A471: rpmioFreePoolItem (rpmmalloc.c:201) ==32637== by 0x417DD48: mireFreeAll (mire.c:102) ==32637== by 0x409566F: rpmFreeRpmrc (rpmrc.c:1005) ==32637== by 0x406EB65: rpmcliFini (poptALL.c:550) ==32637== by 0x406EF8C: rpmcliAllArgCallback (poptALL.c:302) ==32637== by 0xD49AC0: invokeCallbacksOPTION (in /lib/libpopt.so.0.0.0) ==32637== by 0xD49B1A: invokeCallbacksOPTION (in /lib/libpopt.so.0.0.0) ==32637== by 0xD4B3EC: poptGetNextOpt (in /lib/libpopt.so.0.0.0) ==32637== by 0x406F582: rpmcliInit (poptALL.c:766) ==32637== by 0x804AC75: main (rpmqv.c:385) ==32637== Address 0x444a53c is 12 bytes inside a block of size 176 alloc'd ==32637== at 0x4005F94: realloc (vg_replace_malloc.c:525) ==32637== by 0x417DBB5: mireAppend (mire.c:503) ==32637== by 0x4096ABB: defaultMachine (rpmrc.c:469) ==32637== by 0x4096ED1: rpmSetMachine (rpmrc.c:836) ==32637== by 0x409701E: rpmRebuildTargetVars.clone.0 (rpmrc.c:920) ==32637== by 0x4097532: rpmReadConfigFiles (rpmrc.c:1108) ==32637== by 0x406EC9B: rpmcliConfigured (poptALL.c:196) ==32637== by 0x406EF74: rpmcliAllArgCallback (poptALL.c:300) ==32637== by 0xD49AC0: invokeCallbacksOPTION (in /lib/libpopt.so.0.0.0) ==32637== by 0xD49B1A: invokeCallbacksOPTION (in /lib/libpopt.so.0.0.0) ==32637== by 0xD4B3EC: poptGetNextOpt (in /lib/libpopt.so.0.0.0) ==32637== by 0x406F582: rpmcliInit (poptALL.c:766) The 12 bytes is (my guess) the size of the 3 pointers carried by all rpm objects that needs to be fiddled in somewhere. There's some subtleties with miRE reference counts shared between the array and the array elements that are the root cause. There are only 2 obscure code paths affected: here with "rpm -v --showrc" and "rpm -qa 'arch=i[3456]86'" pattern queries. Might be time to rip out both functionalities in favor of the new code in "RPM ACID" that permits patterns as arguments like rpm -e '^python-.*' Note that the above is implemented but largely untested. WORKSFORME is hardly finished, I use RPM rather differently than most. I'll dig the rest of the fix out over the next few days.
smime.p7s
Description: S/MIME cryptographic signature