libkrun icon indicating copy to clipboard operation
libkrun copied to clipboard

`parsed_entrypoint` typo in init/init.c

Open eriksjolund opened this issue 11 months ago • 1 comments

Drive-by comment:

https://github.com/containers/libkrun/blob/e9281c6e16ad18652fef39e205dc2301719dfcc5/init/init.c#L660-L664

Should it be

parsed_entrypoint = 1; 

?

eriksjolund avatar Feb 08 '25 08:02 eriksjolund

It seems it should, thank you for the report!

This reminds me, we should try adding some static analyzer for the C code to the CI (clang-tidy?), maybe this could have been caught - !parsed_entrypoint is always true.

mtjhrc avatar Feb 10 '25 11:02 mtjhrc

This has been fixed with

https://github.com/containers/libkrun/commit/9731156e8f37d3f5565087e1e58c8cbccd4cf47d https://github.com/containers/libkrun/commit/8c1d473ae8075df63fee68432eded143a0dbfc8f

eriksjolund avatar Apr 15 '25 07:04 eriksjolund