Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport 2.1: Expand i386 all.sh tests to include full configuration ASan builds #1873

Merged
merged 3 commits into from
Jul 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/mbedtls/bn_mul.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
* This is done as the number of registers used in the assembly code doesn't
* work with the -O0 option.
*/
#if defined(__i386__) && !defined(__OPTIMIZE__)
#if defined(__i386__) && defined(__OPTIMIZE__)

#define MULADDC_INIT \
asm( \
Expand Down
21 changes: 18 additions & 3 deletions tests/scripts/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -597,15 +597,30 @@ if uname -a | grep -F Linux >/dev/null; then
fi

if uname -a | grep -F x86_64 >/dev/null; then
msg "build: i386, make, gcc" # ~ 30s
# Build once with -O0, to compile out the i386 specific inline assembly
msg "build: i386, make, gcc -O0 (ASan build)" # ~ 30s
cleanup
make CC=gcc CFLAGS='-Werror -m32'
cp "$CONFIG_H" "$CONFIG_BAK"
scripts/config.pl full
make CC=gcc CFLAGS='-O0 -Werror -Wall -Wextra -m32 -fsanitize=address'

msg "test: i386, make, gcc -O0 (ASan build)"
make test

# Build again with -O1, to compile in the i386 specific inline assembly
msg "build: i386, make, gcc -O1 (ASan build)" # ~ 30s
cleanup
cp "$CONFIG_H" "$CONFIG_BAK"
scripts/config.pl full
make CC=gcc CFLAGS='-O1 -Werror -Wall -Wextra -m32 -fsanitize=address'

msg "test: i386, make, gcc"
msg "test: i386, make, gcc -O1 (ASan build)"
make test

msg "build: 64-bit ILP32, make, gcc" # ~ 30s
cleanup
cp "$CONFIG_H" "$CONFIG_BAK"
scripts/config.pl full
make CC=gcc CFLAGS='-Werror -Wall -Wextra -mx32'

msg "test: 64-bit ILP32, make, gcc"
Expand Down