File tree Expand file tree Collapse file tree 8 files changed +66
-24
lines changed Expand file tree Collapse file tree 8 files changed +66
-24
lines changed Original file line number Diff line number Diff line change 3
3
4
4
int main ()
5
5
{
6
- sscanf ();
7
- assert (0 );
6
+ char dest [10 ];
7
+ int result = sscanf ("hello" , "%s" , dest );
8
+ assert (result == 1 );
8
9
return 0 ;
9
10
}
Original file line number Diff line number Diff line change 1
- KNOWNBUG
1
+ CORE
2
2
main.c
3
- --pointer-check --bounds-check
4
- ^EXIT=0$
3
+
4
+ ^\[main.assertion.1\] line 8 assertion result == 1: FAILURE$
5
+ ^\*\* 1 of \d+ failed
6
+ ^VERIFICATION FAILED$
7
+ ^EXIT=10$
5
8
^SIGNAL=0$
6
- ^VERIFICATION SUCCESSFUL$
7
9
--
8
10
^warning: ignoring
Original file line number Diff line number Diff line change 1
1
#include <assert.h>
2
+ #include <stdarg.h>
2
3
#include <stdio.h>
3
4
5
+ int xscanf (const char * format , ...)
6
+ {
7
+ va_list list ;
8
+ va_start (list , format );
9
+ int result = vfscanf (stdin , format , list );
10
+ va_end (list );
11
+ return result ;
12
+ }
13
+
4
14
int main ()
5
15
{
6
- vfscanf ();
7
- assert (0 );
16
+ char dest [10 ];
17
+ int result = xscanf ("%s" , dest );
18
+ assert (result == 1 );
8
19
return 0 ;
9
20
}
Original file line number Diff line number Diff line change 1
- KNOWNBUG
1
+ CORE
2
2
main.c
3
- --pointer-check --bounds-check
4
- ^EXIT=0$
3
+
4
+ ^\[main.assertion.1\] line 18 assertion result == 1: FAILURE$
5
+ ^\*\* 1 of \d+ failed
6
+ ^VERIFICATION FAILED$
7
+ ^EXIT=10$
5
8
^SIGNAL=0$
6
- ^VERIFICATION SUCCESSFUL$
7
9
--
8
10
^warning: ignoring
Original file line number Diff line number Diff line change 1
1
#include <assert.h>
2
+ #include <stdarg.h>
2
3
#include <stdio.h>
3
4
5
+ int xscanf (const char * format , ...)
6
+ {
7
+ va_list list ;
8
+ va_start (list , format );
9
+ int result = vscanf (format , list );
10
+ va_end (list );
11
+ return result ;
12
+ }
13
+
4
14
int main ()
5
15
{
6
- vscanf ();
7
- assert (0 );
16
+ char dest [10 ];
17
+ int result = xscanf ("%s" , dest );
18
+ assert (result == 1 );
8
19
return 0 ;
9
20
}
Original file line number Diff line number Diff line change 1
- KNOWNBUG
1
+ CORE
2
2
main.c
3
- --pointer-check --bounds-check
4
- ^EXIT=0$
3
+
4
+ ^\[main.assertion.1\] line 18 assertion result == 1: FAILURE$
5
+ ^\*\* 1 of \d+ failed
6
+ ^VERIFICATION FAILED$
7
+ ^EXIT=10$
5
8
^SIGNAL=0$
6
- ^VERIFICATION SUCCESSFUL$
7
9
--
8
10
^warning: ignoring
Original file line number Diff line number Diff line change 1
1
#include <assert.h>
2
+ #include <stdarg.h>
2
3
#include <stdio.h>
3
4
5
+ int xscanf (const char * format , ...)
6
+ {
7
+ va_list list ;
8
+ va_start (list , format );
9
+ int result = vsscanf ("hello" , format , list );
10
+ va_end (list );
11
+ return result ;
12
+ }
13
+
4
14
int main ()
5
15
{
6
- vsscanf ();
7
- assert (0 );
16
+ char dest [10 ];
17
+ int result = xscanf ("%s" , dest );
18
+ assert (result == 1 );
8
19
return 0 ;
9
20
}
Original file line number Diff line number Diff line change 1
- KNOWNBUG
1
+ CORE
2
2
main.c
3
- --pointer-check --bounds-check
4
- ^EXIT=0$
3
+
4
+ ^\[main.assertion.1\] line 18 assertion result == 1: FAILURE$
5
+ ^\*\* 1 of \d+ failed
6
+ ^VERIFICATION FAILED$
7
+ ^EXIT=10$
5
8
^SIGNAL=0$
6
- ^VERIFICATION SUCCESSFUL$
7
9
--
8
10
^warning: ignoring
You can’t perform that action at this time.
0 commit comments