stack alloc: Fix stack smashing detection in 32bits
* Fix commit 87a2ccc
* Close #736
This commit is contained in:
parent
c6a27bbe64
commit
708ad330ac
|
@ -29,8 +29,8 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifdef STACK_ALLOC_PROTECT
|
||||
// Try to detect stack smashing
|
||||
#include <assert.h>
|
||||
#define STACK_ALLOC_PROTECT_SET volatile BLASLONG stack_check = 0x7ff8010203040506;
|
||||
#define STACK_ALLOC_PROTECT_CHECK assert(stack_check == 0x7ff8010203040506);
|
||||
#define STACK_ALLOC_PROTECT_SET volatile int stack_check = 0x7fc01234;
|
||||
#define STACK_ALLOC_PROTECT_CHECK assert(stack_check == 0x7fc01234);
|
||||
#else
|
||||
#define STACK_ALLOC_PROTECT_SET
|
||||
#define STACK_ALLOC_PROTECT_CHECK
|
||||
|
|
Loading…
Reference in New Issue