chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Minimize the risks of corruption of chicken-install's cache


From: Mario Domenech Goulart
Subject: [PATCH] Minimize the risks of corruption of chicken-install's cache
Date: Sun, 12 Nov 2023 11:32:07 +0100

Hi,

The attached patches minimize the risk of reusing object files in the
chicken-install cache by different, possibly incompatible, CHICKEN
versions/builds.

The first patch ("chicken-install: Reset egg cache when status file does
not exist") deals with renaming of the so-called status file, which
happened in 2f6a7221.  chicken-install uses the status file to determine
when to invalidate the cache.  One problem with the renaming is: if
chicken-install doesn't find the status file, it will reuse the object
files in the cache.  This might be problematic in case the object files
are used by incompatible CHICKENs (e.g., incompatible CHICKEN versions,
CHICKENs compiled with different C compilers).

That patch solves the problem of CHICKENs newer than 2f6a7221 reusing
possibly incompatible cached object files produced by CHICKENs older
than 2f6a7221.  It doesn't solve the problem of older CHICKENs (i.e.,
the ones compiled with the submitted patch) reusing possibly
incompatible cached object files produced by CHICKENs newer than
2f6a7221.  In those cases, the older CHICKEN will NOT recognize the new
status file name (_STATUS) and will proceed to reuse the possibly
incompatible object files.

To address _that_ problem, a second patch is attached ("egg-environment:
Add chicken version to the path to chicken-install's cache").  It simply
adds the CHICKEN version to the path to the chicken-install cache, so
that older CHICKENs won't look for cached objects in the cache produced
by newer CHICKENs.

Please see more details and caveats in the commit messages.

All the best.
Mario
-- 
http://parenteses.org/mario

Attachment: 0001-chicken-install-Reset-egg-cache-when-status-file-doe.patch
Description: Text Data

Attachment: 0002-egg-environment-Add-chicken-version-to-the-path-to-c.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]