Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
aa2e8940
Commit
aa2e8940
authored
1 year ago
by
Andre Maroneze
Browse files
Options
Downloads
Patches
Plain Diff
[libc] add assigns for a few functions
parent
58fc1cc2
Loading
Loading
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
share/libc/__fc_builtin.c
+1
-0
1 addition, 0 deletions
share/libc/__fc_builtin.c
share/libc/__fc_builtin.h
+6
-0
6 additions, 0 deletions
share/libc/__fc_builtin.h
share/libc/stdio.c
+1
-0
1 addition, 0 deletions
share/libc/stdio.c
share/libc/stdlib.h
+4
-0
4 additions, 0 deletions
share/libc/stdlib.h
with
12 additions
and
0 deletions
share/libc/__fc_builtin.c
+
1
−
0
View file @
aa2e8940
...
...
@@ -130,6 +130,7 @@ unsigned long Frama_C_unsigned_long_interval(unsigned long min, unsigned long ma
return
r
;
}
/*@ assigns \nothing; */
extern
void
__builtin_abort
(
void
)
__attribute__
((
noreturn
));
// GCC builtin
void
Frama_C_abort
(
void
)
...
...
This diff is collapsed.
Click to expand it.
share/libc/__fc_builtin.h
+
6
−
0
View file @
aa2e8940
...
...
@@ -24,6 +24,7 @@
#define Frama_C_BUILTIN
#include
"features.h"
__PUSH_FC_STDLIB
#include
"__fc_alloc_axiomatic.h"
#include
"__fc_define_size_t.h"
__BEGIN_DECLS
...
...
@@ -192,6 +193,11 @@ __attribute__((FC_BUILTIN));
/*@ assigns \result \from p; */
extern
size_t
Frama_C_offset
(
const
void
*
p
)
__attribute__
((
FC_BUILTIN
));
/*@
allocates \result;
assigns __fc_heap_status \from size, __fc_heap_status;
assigns \result \from indirect:size, indirect:__fc_heap_status;
*/
extern
void
*
Frama_C_malloc_fresh
(
size_t
size
)
__attribute__
((
FC_BUILTIN
));
//@ assigns \result \from i;
...
...
This diff is collapsed.
Click to expand it.
share/libc/stdio.c
+
1
−
0
View file @
aa2e8940
...
...
@@ -44,6 +44,7 @@ FILE * __fc_stdin = &__fc_initial_stdin;
// "rb+","r+b","wb+","w+b","ab+","a+b".
/*@
requires valid_mode: valid_read_string(mode);
assigns \result \from mode[0 .. strlen(mode)];
*/
static
bool
is_valid_mode
(
char
const
*
mode
)
{
if
(
!
(
mode
[
0
]
!=
'r'
||
mode
[
0
]
!=
'w'
||
mode
[
0
]
!=
'a'
))
return
false
;
...
...
This diff is collapsed.
Click to expand it.
share/libc/stdlib.h
+
4
−
0
View file @
aa2e8940
...
...
@@ -811,6 +811,10 @@ extern char *realpath(const char *restrict file_name,
// This function may allocate memory for the result, which is not supported by
// some plugins such as Eva. In such cases, it is preferable to use the stub
// provided in stdlib.c.
/*@
allocates \result;
assigns \result \from path[0 .. strlen(path)];
*/
extern
char
*
canonicalize_file_name
(
const
char
*
path
);
__END_DECLS
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment