Chameleon > Bug Reports

A few bugs I found


I was experimenting with the undocumented "Kernel Cache" boot flag that lets you choose a custom kernel cache path explicitly instead of using the default path.

However, it didn't work at all, so I started debugging it and found 2 issues:

1) In sys.c, the GetFileInfo() function has the following code:

--- Code: ---strncpy(gMakeDirSpec, name, idx);
--- End code ---
This results in gMakeDirSpec not being a null-terminated in most cases. Adding "gMakeDirSpec[idx] = '\0';" fixes this.

2) I'm not sure this is a bug, but boot.c tests a weird condition for the kernel cache file time:

--- Code: ---if (ret == 0 && cachetime != (exttime + 1)) {
trycache = 0;

--- End code ---
This makes using a custom kernel cache path harder, as I need to carefully craft the cache file time to satisfy the condition above.

After making the fixes, I can use a custom kernel cache file just fine.

Could you add those fixes to the trunk?

Maybe this feature should be more documented. I use a hardware RAID volume for booting (HighPoint RAID controller), and Chameleon has problems reading files that have a physical offset of more than 2TB in the volume. Until now, I used to defragment my drive every time I update my boot files (kexts, kernel, etc.). Now, with the custom kernel cache path, I no longer have to do this.

open an issue at :
With the proper diff patch file.



[0] Message Index

Go to full version