Skip to content
/ stack Public

Custom stack implementation with advanced usability, performance and security features written in C

License

Notifications You must be signed in to change notification settings

nerett/stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stack

This is a custom stack data structure implementation written in C (with some convinient C++ adjustments) that includes advanced security and debug features like head structure & data canaries, data hashing, constant state validation and expanded html logs with current state dump triggered by encountered error codes. User types for data are supported as well as user dump functions for user types.

Analyzing logs

stack automatically validates its state and writes stack_log.html (by default). Green OK lines indicate, that everything goes normally, and red ERROR lines appear when a problem occurs (in this case all values of struct Stack are dumped).

Log example:

log-example

Building from source

Downloading

Download this repository with

git clone https://github.com/nerett/stack.git

Installing dependencies

Install required packages automatically with

make install-dependencies-pkg PACKAGEMANAGER=<your-package-manager-name> #apt is used if PACKAGEMANAGER is not defined

...or install them manually with your distro package manager (check list here).

Building

Build stack as a standalone program with

make MODE=DEBUG #or MODE=RELEASE; MODE=RELEASE if not defined

You can also include stack in your project with the help of stack.h as a source code or as linkable library object files (note: object files libstack.o and libstack_config.o are created during the build process in any mode).

Running

You can run builded release/debug version of standalone stack with

make run MODE=DEBUG #MODE=RELEASE if MODE is not defined

Use rund instead of run to run with valgrind

...or run this binary with manually from project directory.

Rebuilding

To totally rebuild the project run

make clean
make MODE=<modename>

Dependencies

This project actually depends on libc and building requires make, g++ and git (it can also require valgrind installed to use rund target).

Documentation

This section isn't done yet.

About project

This programm was written during MIPT Ded's cource.

About

Custom stack implementation with advanced usability, performance and security features written in C

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published