mozilla

Revision 431763 of Building SpiderMonkey with UBSan

  • Revision slug: Building_SpiderMonkey_with_UBSan
  • Revision title: Building SpiderMonkey with UBSan
  • Revision id: 431763
  • Created:
  • Creator: yeukhon
  • Is current revision? No
  • Comment

Revision Content

Use this script instead of the MDN one: https://developer.mozilla.org/en-US/docs/Building_Firefox_with_Address_Sanitizer

#! /bin/sh

if [ -z $1 ] ; then
    echo "usage: $0 <dirname>"
elif [ -d $1 ] ; then
    echo "directory $1 already exists"
else
    autoconf2.13
    mkdir $1
    cd $1
    LLVM_ROOT="/home/vagrant/llvm"
    SANFLAG="-fsanitize=alignment,bool,bounds,enum,float-cast-overflow,integer-divide-by-zero,null,object-size,return,shift,signed-integer-overflow,unreachable,vla-bound -Dxmalloc=myxmalloc" \
    CC="$LLVM_ROOT/build/Release+Asserts/bin/clang" \
    CXX="$LLVM_ROOT/build/Release+Asserts/bin/clang++" \
    CFLAGS="$SANFLAG" \
    CXXFLAGS="$SANFLAG" \
    MOZ_LLVM_HACKS=1 \
            ../configure --enable-debug --disable-optimize
    make -j 8
fi

Revision Source

<p>Use this script instead of the MDN one: https://developer.mozilla.org/en-US/docs/Building_Firefox_with_Address_Sanitizer</p>
<pre>
#! /bin/sh

if [ -z $1 ] ; then
    echo "usage: $0 &lt;dirname&gt;"
elif [ -d $1 ] ; then
    echo "directory $1 already exists"
else
    autoconf2.13
    mkdir $1
    cd $1
    LLVM_ROOT="/home/vagrant/llvm"
    SANFLAG="-fsanitize=alignment,bool,bounds,enum,float-cast-overflow,integer-divide-by-zero,null,object-size,return,shift,signed-integer-overflow,unreachable,vla-bound -Dxmalloc=myxmalloc" \
    CC="$LLVM_ROOT/build/Release+Asserts/bin/clang" \
    CXX="$LLVM_ROOT/build/Release+Asserts/bin/clang++" \
    CFLAGS="$SANFLAG" \
    CXXFLAGS="$SANFLAG" \
    MOZ_LLVM_HACKS=1 \
            ../configure --enable-debug --disable-optimize
    make -j 8
fi</pre>
Revert to this revision