]> Zhao Yanbai Git Server - minix.git/commit
Disable malloc instrumentation for VM (#2) 51/3151/1
authorDavid van Moolenbroek <david@minix3.org>
Sun, 6 Sep 2015 09:16:12 +0000 (11:16 +0200)
committerDavid van Moolenbroek <david@minix3.org>
Thu, 17 Sep 2015 14:07:31 +0000 (14:07 +0000)
commitc07c198b5fe5aa14cf13f25534c15b7e9abfcf86
treeaaa986979deeffacab6b6b38eb481c97e88e95e7
parent76b68f9f99acc504d30212cb3424f87dd2ec0fd5
Disable malloc instrumentation for VM (#2)

When the malloc code is instrumented, the global _brksize variable
should not be transferred.  However, when the malloc code is not
instrumented, failing to transfer _brksize would reset the heap
upon state transfer.  In this patch, the magic pass stores the flag
indicating whether memory function instrumentation is disabled, in
the target process.  This allows libmagic to check this flag during
state transfer, to see whether it should transfer _brksize or not.

Change-Id: Ia004651e21e08b0ed3f5305865c53c6659e18f38
minix/llvm/include/magic.h
minix/llvm/include/magic_common.h
minix/llvm/include/magic_structs.h
minix/llvm/include/st/typedefs.h
minix/llvm/passes/magic/MagicPass.cpp
minix/llvm/static/magic/magic.c
minix/llvm/static/magic/magic_st.c