Skip to content

Commit

Permalink
[libcrystax] Fix bug #1369 - SIGSEGV on lrintf
Browse files Browse the repository at this point in the history
This is bug of GCC optimizator, when call of "(long)rintf" is
replaced by "lrintf", thus causing infinite recursion, when lrintf
calls itself again and again. Adding "-fno-builtin-rint",
"-fno-builtin-rintl" and "-fno-builtin-rintf" options when building
libcrystax disables this logic, thus fixes the bug.

Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
  • Loading branch information
dmsck committed May 20, 2016
1 parent e1c0749 commit 8f82c44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions sources/crystax/bin/config
Expand Up @@ -454,6 +454,12 @@ common_cflags_for_abi()
echo "-ffunction-sections -fdata-sections"
echo "-fdiagnostics-show-option"

# This is to workaround GCC "(long)fn -> lfn" optimization bug.
# See https://android-review.googlesource.com/#/c/96345/ for details.
echo "-fno-builtin-rint"
echo "-fno-builtin-rintf"
echo "-fno-builtin-rintl"

echo "-Wall -Wextra"
#echo "-Wunused"
#echo "-Wframe-larger-than=2048"
Expand Down
1 change: 0 additions & 1 deletion tests/device/crystax-issue1369-lrintf/properties.json

This file was deleted.

0 comments on commit 8f82c44

Please sign in to comment.