Kevin Day [Tue, 9 Jul 2024 04:13:43 +0000 (23:13 -0500)]
Progress: Continue migrating the project, possibly wrapping up the migration.
Additional review and tests are still required but this fixes some additional problems encountered during testing.
Try to improve grammar by treating special variables as proper nouns, such as Entry, Exit, Rule, Item, etc...
Move the environment map onto the Instance.
I decided not to put it on the cache but I might change my mind as this is being added for cache purposes.
This should help reduce repeated allocations on every execute.
I may want to add features to the Controller program to better control when to clear or deallocate memory for more security at the cost of resources and performance.
This would allow for post-compile-time configuration.
A mistake exposed a lack of error reporting for when Items is an empty array.
Add controller_print_error_rule_item_execute_none() to account for this.
The bug is that "object" and "content" in controller_rule_parameters_read() are actually optional.
I was returning a parameter error when these were not defined.
Reduce the local allocation of f_state_t and pass it along as a parameter.
These particular functions should be being called sequentially and should be able to safely pass along the state between them.
The settings for the IKI read state is temporarily modified as appropriate and then restored when finished.
Don't assign enabled variable on lock failure to avoid potential race condition.
Kevin Day [Mon, 8 Jul 2024 00:42:31 +0000 (19:42 -0500)]
Progress: Continue migrating the project, getting close to wrapping up migration.
The program appears to run and work for simple scripts.
I have not done an extensive code review.
I have not done an extensive runtime test.
This reduces the small allocation down from 16 to 8 which shows a closer allocation level to that of the 0.6 version of Controller.
The number of allocations is still fewer even with this change, so that is real good.
Add some missing code and handle other problems such as allocation problems.
An incorrect lock is being used on the execution.
I need to look out for other accidental lock migration mistakes.
This performs the time calculation changes that I recently added as a separate commit in the 0.6 version of Controller.
Kevin Day [Sat, 6 Jul 2024 23:58:47 +0000 (18:58 -0500)]
Progress: Continue migrating the project, addressing instances double-pointer.
I forgot that instances is a double-pointer.
Adjust the code to ensure that the double-pointer is handled and that the locks are allocated and de-allocated.
Add additional comments regarding things that need to be done.
Kevin Day [Wed, 3 Jul 2024 04:56:55 +0000 (23:56 -0500)]
Cleanup: Add time based version in each of the documentation and specification files where it is missing.
I am just setting the current date rather than trying to figure out the date of last change.
I also noticed that the documents/time.txt file has an incorrect license specified.
The original files from the 0.6 and 0.7 branches of the FLL project already show the open-standard-license-1.0-or-later as the license.
Make sure the documents/time.txt correctly identifies the license as open-standard-license-1.0-or-later to avoid confusion.
Kevin Day [Thu, 27 Jun 2024 02:56:23 +0000 (21:56 -0500)]
Progress: Continue migrating the project, where the code now compiles without error.
The migration is not complete.
This simply has all of the compilation problems addressed.
There are still several print functions that need to be migrated.
There are probably a lot of out of date comments, which will be fixed as discovered.
I need to walk through each and every function, from a start to finish perspective, and make sure that all the logic is still valid.
I have good reason to believe that there are a lot of things to correct.
Kevin Day [Sun, 2 Jun 2024 23:51:58 +0000 (18:51 -0500)]
Progress: Continue migrating the project, notably refactoring out controller_global_t.
A lot of the changes made it possible to remove th controller_global_t.
Restructure the code to do this.
Most of the compile errors are fixed.
I still need to go over the logic and fix things.
I still need to copy over some functions.
I still need to move the print functions around.
I still need to do runtime tests once all of the above is completed.
Kevin Day [Thu, 23 May 2024 04:41:32 +0000 (23:41 -0500)]
Update: Remove the ++first and ++last parameters and relating logic.
I have used this for a while and have decided these are not worth the effort.
The addition is very nice but the additional code and logic is just extra maintenance and complexity for very little gain.
Kevin Day [Thu, 9 May 2024 01:51:11 +0000 (20:51 -0500)]
Security: Potential buffer overflow on 0 length array.
The length_name_item variable can potentially be zero.
The assignment of "name_item[length_name_item] = 0;" will then result in an assignment on a 0 length array.
Kevin Day [Thu, 11 Apr 2024 03:46:56 +0000 (22:46 -0500)]
Progress: Continue migrating the project.
Start brining in the enumerations and types.
There is still a lot of inconsistency in the type delete functions to deal with.
Many of the "delete" functions may end up being replaced with a "resize" method.
This removes the "--init" parameter.
I figure I might as well simplify the design a little and have the init and controller be more separate.
Kevin Day [Tue, 9 Apr 2024 01:37:34 +0000 (20:37 -0500)]
Update: Better utilize functionality of C for extern types.
I am creating a string pointer and passing it through a structure to dynamically pass different progam names for each program.
This is fine for many languages that are not C/C++.
For C/C++, this can be done in a cleaner and more efficient way.
The extern type can be declared in the main project and use that.
Then, the final binary is the only case where the actual implementation of the extern variable must exist.
That means each program (init and controller) will define their own program name string.
No extra memory in the structure needs to be used.
This is cleaner, simpler, and more maintainable.
Kevin Day [Thu, 4 Apr 2024 03:20:54 +0000 (22:20 -0500)]
Progress: Begin migrating the project, doing some initial preparations.
Tweak the fakefile structure.
Remove the "as_init" fakefile mode.
Use library instead of object so that both controller and init may use the same library.
I may want to create a custon "init only" mode where init uses libinit.so rather than libcontroller.so.
Have the build settings pass "-D_controller_as_init_" directly for the init fakefile.
Add the child process exit code.
I may end up changing this again, but I wanted to start off very consistent with other projects design.
Finish the help printing process.
The program name is moved into the specific programs.
Add missing control group header file include.
Fix a mistake whee the main thread signal function is calling itself rather than the main signal handler.
This bad behavior results in a segfault.
Kevin Day [Thu, 4 Apr 2024 00:33:18 +0000 (19:33 -0500)]
Update: Remove bootstrap script.
This doesn't need to exist here now that this is in a separate project.
The bootstrap script is also very limited in design and the Controller project uses a lot more advanced functionality.