User Tools

Site Tools


c

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
c [2024/07/18 14:15] – adds tsan ASLR workaround ninec [2025/08/04 13:05] (current) nine
Line 36: Line 36:
 Sulution, disable ASLR for testing: Sulution, disable ASLR for testing:
   setarch --addr-no-randomize build/path/to/binary   setarch --addr-no-randomize build/path/to/binary
 +
 +or:
 +  sudo sysctl vm.mmap_rnd_bits=30   # 30: partly, 28 totally
 +
 +==== alternatives ====
 +
 +declare alternatives:
 +<code>
 +sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 20
 +sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 20
 +sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-12 20
 +sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 30
 +sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 30
 +sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-13 30
 +</code>
 +
 +select the right alternatives:
 +<code>
 +sudo update-alternatives --config gcc
 +sudo update-alternatives --config g++
 +sudo update-alternatives --config gcov
 +</code>
c.1721312120.txt.gz · Last modified: 2024/07/18 14:15 by nine