[Rd] Fix for incorrect use of restrict in xz third party code

Olaf Mersmann olafm at statistik.tu-dortmund.de
Sat Feb 20 00:00:35 CET 2010


the included XZ Utils source code contains an incorrect use of the
restrict keyword. This leads to data corruption under certain
circumstances. For a short discussion of the problem see


This was fixed in the XZ Utils git repository in commit 

  commit 49cfc8d392cf535f8dd10233225b1fc726fec9ef
  Author: Lasse Collin <lasse.collin at tukaani.org>
  Date:   Tue Sep 15 21:07:23 2009 +0300

    Fix incorrect use of "restrict".

Since then, there has not been a proper release of the XZ Utils so I
have applied said patch to the sources included in R and added a note
to the R_changes file in the src/extra/xz/ directory detailing the

This 'bug' is only triggered if the Intel C or gcc 4.4 is used to
compile R and the included liblzma is used instead of a system wide
one, so it might not be worth the trouble of patching the sources
instead of waiting for a new release. If anyone wants to apply a fix,
I have prepared a patch with all the changes which can be found here


Olaf Mersmann

More information about the R-devel mailing list