Revision dd40860e18a04e5ad9e265fdfd552ce0c3c3adbe authored by stamatak on 05 February 2014, 12:31:19 UTC, committed by stamatak on 05 February 2014, 12:31:19 UTC
1 parent 041014c
Raw File
check_malloc.sh
#!/bin/bash

# check if the executable wants to dynamically import any of the malloc/free
# related symbols.

for i in $@; do
   
	nm $i | egrep -e "U malloc$" -e "U memalign$" -e "U posix_memalign$" -e "U free$" -e "U realloc$" -e "U calloc$"   

    if [ $? -eq "0" ]; then
	echo "ERROR: $i: memory allocation without rax_ prefix detected."	
    fi
done

exit 0;


back to top