Skip to content

Improve stack smash checking #194

Description

@Jlisowskyy
/**
 * @todo Implement this when random number generator is implemented
 */
static void __stack_chk_init_kernel() {}

/**
 * @todo Add some debug message about stack in future
 */
WRAP_CALL NO_RET void __stack_chk_fail_kernel()
{
    arch::KernelPanic("Stack smashing detected");
    while (true);  // This makes it explicit to the compiler that this function does not return.
}
#endif  // __ALKOS_LIBK__

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions