[Rpm-maint] RPM 4.12.0 beta1 released

Panu Matilainen pmatilai at laiskiainen.org
Tue Aug 26 09:47:31 UTC 2014


On 08/25/2014 06:23 PM, Thierry Vignaud wrote:
> On 18 August 2014 10:44, Panu Matilainen <pmatilai at redhat.com> wrote:
>> As usual, the full details & download info are at
>>
>>      http://rpm.org/wiki/Releases/4.12.0
>
> The attached program shows a regression that is affecting URPM.
> Now Fclose() returns -2 in the same code path where rpm-4.11.x returned 0:
>
>
> # RPM-4.11:
> $ gcc -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe
> -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall
> -Wextra -fno-strict-aliasing -DRPM490 -O2 -g -pipe -Wformat
> -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector
> --param=ssp-buffer-size=4 -fPIC -lrpm -lrpmio -lrpmbuild t.c -o tt
> &&./tt
> Fclose() ==0
> START=1; END=
>
> # RPM-4.12:
> $ ./tt
> Fclose() ==-2
> close() 1 => OK=0
> NOT OK
>
>
> (just put any compressed string in the target path.eg: "echo toto
> |xz>t/synthesis.sample-xz.cz")

Right... changing the error handling in Fclose() closer to what it was 
previously fixes this thing:

--- a/rpmio/rpmio.c
+++ b/rpmio/rpmio.c
@@ -1035,12 +1035,12 @@ int Fclose(FD_t fd)
  	if ((_rpmio_debug || rpmIsDebug()) && fps->fdno == -1)
  	    fdstat_print(fd, fps->io->ioname, stderr);

-	if (ec == 0 && rc)
-	    ec = rc;
-
  	/* Leave freeing the last one after stats */
  	if (fps->prev == NULL)
  	    break;
+
+	if (ec == 0 && rc)
+	    ec = rc;
      }
      fdstat_exit(fd, FDSTAT_CLOSE, rc);
      DBGIO(fd, (stderr, "==>\tFclose(%p) rc %lx %s\n",


However AFAICS the original is broken for a different case (if the io is 
not stacked then an error from close would go unnoticed). Need to take a 
closer look I guess.

In the meanwhile, 4.12 beta1 is pretty broken. Testing for things like 
this is good, but you dont want to distribute packages built with it, 
I'll try to put beta2 together tomorrow.

	- Panu -

	- Panu -


More information about the Rpm-maint mailing list