Closed tavianator closed 7 years ago
sorry: issue not fixed yet, my mistake
Sorry for the snafu.
I have augmented the testcase thus:
#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
int main(void) {
const char *str = "";
char *endptr;
long value = strtol(str, &endptr, 10);
printf("%d %ld %td\n", (int)errno, value, endptr - str);
return 0;
}
and this case at least now seems to be correctly handled:
$ tis-interpreter.sh t.c
[value] Analyzing a complete application starting at main
[value] Computing initial state
[value] Initial state computed
0 0 0
[value] done for function main
$ gcc t.c && ./a.out
0 0 0
It is a bit tricky to share the bulk, but not the details, of ato*
, strto*
, and *scanf
. This is a great bug report, please do not hesitate to report any further problems you find.
The following source:
Crashes tis-interpreter: