Skip to content

Improve stack smash checking #194

@Jlisowskyy

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__

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