[crac] RFR: 8368929: [CRaC] Move CPUFeatures check to C/R engine

Jan Kratochvil jkratochvil at openjdk.org
Wed Oct 1 09:23:11 UTC 2025


On Tue, 30 Sep 2025 13:17:54 GMT, Radim Vansa <rvansa at openjdk.org> wrote:

> Right now the logic checking if CPU features used before checkpoint match current CPU features is in VM code. VM stores and retrieves CPU features through C/R API's user_data extension. This is convenient when we have a single image that can be either accepted or rejected, but does not offer the flexibility for C/R engine to select the best image for current execution environment.
> 
> The goal of this issue is to move to a declarative API that will express the requirements using more abstract means, labels (for CPU architecture) and bitmaps (for CPU features).

src/java.base/share/native/libcrexec/image_constraints.cpp line 198:

> 196:   });
> 197:   Hashtable<Tag> ht(keys, tags.size());
> 198:   delete keys;

src/java.base/share/native/libcrexec/image_constraints.cpp:198:3: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
  198 |   delete keys;
      |   ^
      |         []
src/java.base/share/native/libcrexec/image_constraints.cpp:188:23: note: allocated with 'new[]' here
  188 |   const char **keys = new(std::nothrow) const char*[tags.size()];
      |                       ^

-------------

PR Review Comment: https://git.openjdk.org/crac/pull/266#discussion_r2393957004


More information about the crac-dev mailing list