Skip to content
Snippets Groups Projects
Commit c15d2787 authored by Julien Signoles's avatar Julien Signoles
Browse files

Merge branch 'bugfix/basile/eacsl-151-backtrace' into 'master'

[eacsl] Fix runtime backtraces

Closes e-acsl#151

See merge request frama-c/frama-c!3133
parents f2937365 18cd49ff
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,10 @@ Plugin E-ACSL <next-release> ...@@ -27,6 +27,10 @@ Plugin E-ACSL <next-release>
- E-ACSL [2021-04-07] Add support for multiple binders in guarded - E-ACSL [2021-04-07] Add support for multiple binders in guarded
quantifications (frama-c/e-acsl#127). quantifications (frama-c/e-acsl#127).
-* runtime [2021-04-08] Fix backtrace output on failed assertion
(frama-c/e-acsl#151).
-* runtime [2021-04-08] Fix incorrect check on program arguments when the
main function takes no arguments (frama-c/e-acsl#151).
-* runtime [2021-03-30] Fix the end address of the memory segments in the -* runtime [2021-03-30] Fix the end address of the memory segments in the
RTL layouts. RTL layouts.
- E-ACSL [2021-03-25] Add support for `check` and `admit` annotations - E-ACSL [2021-03-25] Add support for `check` and `admit` annotations
......
...@@ -803,8 +803,10 @@ fi ...@@ -803,8 +803,10 @@ fi
# compilation # compilation
if [ -n "$OPTION_RT_DEBUG" ]; then if [ -n "$OPTION_RT_DEBUG" ]; then
OPT_CFLAGS="-g3 -O0 -fno-omit-frame-pointer" OPT_CFLAGS="-g3 -O0 -fno-omit-frame-pointer"
OPT_LDFLAGS="-no-pie"
else else
OPT_CFLAGS="-g -O2" OPT_CFLAGS="-g -O2"
OPT_LDFLAGS=""
fi fi
# Gcc and related flags # Gcc and related flags
...@@ -837,7 +839,8 @@ if [ "`basename $CC`" = 'clang' ]; then ...@@ -837,7 +839,8 @@ if [ "`basename $CC`" = 'clang' ]; then
fi fi
CPPFLAGS="$OPTION_CPPFLAGS" CPPFLAGS="$OPTION_CPPFLAGS"
LDFLAGS="$OPTION_LDFLAGS" LDFLAGS="$OPTION_LDFLAGS
$OPT_LDFLAGS"
# Dlmalloc # Dlmalloc
if [ -n "$OPTION_WITH_DLMALLOC" ]; then if [ -n "$OPTION_WITH_DLMALLOC" ]; then
......
...@@ -97,16 +97,22 @@ static uintptr_t get_stack_start(int *argc_ref, char *** argv_ref) { ...@@ -97,16 +97,22 @@ static uintptr_t get_stack_start(int *argc_ref, char *** argv_ref) {
// Check that the assumption that argc and argv are stored below environ in // Check that the assumption that argc and argv are stored below environ in
// the stack holds // the stack holds
DVASSERT(stack_start <= (uintptr_t)argc_ref if (argc_ref) {
&& (uintptr_t)argc_ref <= stack_end, DVASSERT(stack_start <= (uintptr_t)argc_ref
"Assumption that argc is stored below environ is not verified.\n\ && (uintptr_t)argc_ref <= stack_end,
\tStack: [%a - %a]\n\t&argc: %a", "Assumption that argc is stored below environ is not verified.\n"
stack_start, stack_end, argc_ref); "\tStack: [%a - %a]\n"
DVASSERT(stack_start <= (uintptr_t)argv_ref "\t&argc: %a\n",
&& (uintptr_t)argv_ref <= stack_end, stack_start, stack_end, argc_ref);
"Assumption that argv is stored below environ is not verified.\n\ }
\tStack: [%a - %a]\n\t&argc: %a", if (argv_ref) {
stack_start, stack_end, argc_ref); DVASSERT(stack_start <= (uintptr_t)argv_ref
&& (uintptr_t)argv_ref <= stack_end,
"Assumption that argv is stored below environ is not verified.\n"
"\tStack: [%a - %a]\n"
"\t&argv: %a\n",
stack_start, stack_end, argv_ref);
}
return stack_start; return stack_start;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment