Skip to content

Instantly share code, notes, and snippets.

View sergeyklay's full-sized avatar
🇺🇦

Serghei Iakovlev sergeyklay

🇺🇦
View GitHub Profile
@sergeyklay
sergeyklay / no-omit-frame-pointer.md
Last active July 6, 2021 10:57
GCC/Clang -fno-omit-frame-pointer and -fsanitize=address

Description

Frame pointer omission does make debugging significantly harder. Local variables are harder to locate and stack traces are much harder to reconstruct without a frame pointer to help out. Also, accessing parameters can get more expensive since they are far away from the top of the stack and may require more expensive addressing modes.

The -fno-omit-frame-pointer option direct the compiler to generate code that maintains and uses stack frame pointer for all functions so that a debugger can still produce a stack backtrace even with optimizations flags.

Irrespective if you use the flag, not every function needs a frame pointer in the first place, so you can't always expect a difference with the flag.

Also, whether the function has a frame pointer is an implementation detail. Compilers can differ in implementation details (and usually they do).

@sergeyklay
sergeyklay / pyenv-install.md
Last active July 4, 2021 13:04
Multiple Python versions using pyenv and python-build

Multiple Python versions using pyenv and python-build

Installation

Install pyenv

git clone git@github.com:pyenv/pyenv.git ~/.pyenv
cd ~/.pyenv && src/configure && make -C src

My Personal WeeChat Cheat Sheet

Requirements

You need at least WeeChat 3.2-dev

Install

Ubuntu/Debian