Skip to content

Instantly share code, notes, and snippets.

@deltheil
Created July 16, 2014 08:24
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deltheil/3d446d00a39cca138978 to your computer and use it in GitHub Desktop.
Save deltheil/3d446d00a39cca138978 to your computer and use it in GitHub Desktop.
LuaJIT + Valgrind (linux x64)
  1. use Valgrind 3.8.1 since 3.9.0 broke LuaJIT
  2. build LuaJIT with the following options:
diff --git a/src/Makefile b/src/Makefile
index c558003..39676b8 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -57,7 +57,7 @@ CCOPT_mips=
 #
 CCDEBUG=
 # Uncomment the next line to generate debug information:
-#CCDEBUG= -g
+CCDEBUG= -g
 #
 CCWARN= -Wall
 # Uncomment the next line to enable more warnings:
@@ -131,7 +131,7 @@ XCFLAGS=
 # This define is required to run LuaJIT under Valgrind. The Valgrind
 # header files must be installed. You should enable debug information, too.
 # Use --suppressions=lj.supp to avoid some false positives.
-#XCFLAGS+= -DLUAJIT_USE_VALGRIND
+XCFLAGS+= -DLUAJIT_USE_VALGRIND
 #
 # This is the client for the GDB JIT API. GDB 7.0 or higher is required
 # to make use of it. See lj_gdbjit.c for details. Enabling this causes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment