On May 27, 2011, at 11:04 AM, devzero2000 wrote:

> On Fri, May 27, 2011 at 4:53 PM, Jeff Johnson <n3...@mac.com> wrote:
> Just FYI:
> 
>        These are deep internal interfaces which should NOT
>        be relied on within RPM.
> 
> I.e. if you're segfaulting here you need an RPM upgrade, not a patch.
> The fingerprinting code is NOT a supportable API, and IS being
> actively refactored to be replaced and eliminated.
> 
> I had imagined, in fact, I was not sure. 
> This code path is explicitly exercised as part of monthly
> releases, and the fact that the segfault wasn't seen indicates
> a data driven obscure code path that SHOULD be looked at
> carefully in the packaging, not in RPM.
> Ok, for now revert and will ask the POLKY (I think) developer the test case.

Nah, no reason to revert a patch for an RPM segfault whatsoever ;-)

But RPM is a "canary in the mine shaft" here. Something else in the packaging
needs to be looked at as well, and the fact that the segfault wasn't caught
by "continuous integration" needs to be examined and fixed too.

Likely gonna be a tricky reproducer ... perhaps the easiest
approach would be to just grab a pile of poky/yacto packages and
try de facto testing. I'm sure its gonna be hard to write a specific
test case.


hth

73 de Jeff

> 
> Short answer: You can expect further breakage.
> 
> 
> 73 de Jeff
> 
> 
> On May 27, 2011, at 9:47 AM, Pinto Elia wrote:
> 
> >  RPM Package Manager, CVS Repository
> >  http://rpm5.org/cvs/
> >  
> > ____________________________________________________________________________
> >
> >  Server: rpm5.org                         Name:   Pinto Elia
> >  Root:   /v/rpm/cvs                       Email:  devzero2...@rpm5.org
> >  Module: rpm                              Date:   27-May-2011 15:47:30
> >  Branch: HEAD                             Handle: 2011052713472901
> >
> >  Modified files:
> >    rpm                     CHANGES
> >    rpm/rpmdb               fprint.c
> >
> >  Log:
> >    In fpLookupSubdir, data returned by hash should be of type
> >    "struct rpmffi_s **" instead of "struct rpmffi_s *" to avoid
> >    segfault. Patch by Qing He.
> >
> >  Summary:
> >    Revision    Changes     Path
> >    1.3651      +3  -0      rpm/CHANGES
> >    1.41        +3  -3      rpm/rpmdb/fprint.c
> >  
> > ____________________________________________________________________________
> >
> >  patch -p0 <<'@@ .'
> >  Index: rpm/CHANGES
> >  
> > ============================================================================
> >  $ cvs diff -u -r1.3650 -r1.3651 CHANGES
> >  --- rpm/CHANGES      27 May 2011 07:19:54 -0000      1.3650
> >  +++ rpm/CHANGES      27 May 2011 13:47:29 -0000      1.3651
> >  @@ -8,6 +8,9 @@
> >       - afb: yaml: use !!timestamp for timestamps
> >
> >   5.4.0 -> 5.4.1:
> >  +    - devzero2000: In fpLookupSubdir, data returned by hash should be of 
> > type
> >  +      "struct rpmffi_s **" instead of "struct rpmffi_s *" to avoid
> >  +      segfault. Patch by Qing He.
> >       - devzero2000: the elfutils --reloc-debug-sections is useful
> >         mostly for LKM and not in general. Better to enable
> >         when needed/useful and not systemwide.
> >  @@ .
> >  patch -p0 <<'@@ .'
> >  Index: rpm/rpmdb/fprint.c
> >  
> > ============================================================================
> >  $ cvs diff -u -r1.40 -r1.41 fprint.c
> >  --- rpm/rpmdb/fprint.c       6 Mar 2010 16:20:46 -0000       1.40
> >  +++ rpm/rpmdb/fprint.c       27 May 2011 13:47:30 -0000      1.41
> >  @@ -333,7 +333,7 @@
> >       *te = '\0';
> >
> >       while (te < se) {
> >  -    struct rpmffi_s * recs;
> >  +    struct rpmffi_s ** recs;
> >       int numRecs;
> >       int i;
> >
> >  @@ -346,8 +346,8 @@
> >           const char * link;
> >           int fx;
> >
> >  -        fx = recs[i].fileno;
> >  -        fi =  recs[i].p->fi;
> >  +        fx = recs[i]->fileno;
> >  +        fi =  recs[i]->p->fi;
> >           flink = fi->flinks[fx];
> >           if (!(flink && *flink != '\0'))
> >               continue;
> >  @@ .
> > ______________________________________________________________________
> > RPM Package Manager                                    http://rpm5.org
> > CVS Sources Repository                                rpm-...@rpm5.org
> 
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to