help-libidn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

about that strange call to a non-portable alloca()


From: Dennis Clarke
Subject: about that strange call to a non-portable alloca()
Date: Sat, 31 Mar 2018 15:21:44 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0


Probably best not to toss away cmd before the return .. oops :-\

in ./fuzz/main.c

    82  int main(int argc, char **argv)
    83  {
    84          int ret_val = 0;
85 /* if VALGRIND testing is enabled, we have to call ourselves with valgrind checking */
    86          if (argc == 1) {
    87                  const char *valgrind = getenv("TESTS_VALGRIND");
    88
    89                  if (valgrind && *valgrind) {
90 size_t cmdsize = strlen(valgrind) + strlen(argv[0]) + 32;
    91                          char *cmd = malloc(cmdsize);
92 snprintf(cmd, cmdsize, "TESTS_VALGRIND="" %s %s", valgrind, argv[0]);
    93                          ret_val = ( system(cmd) != 0 );
    94                          free(cmd);
    95                          return ret_val;
    96                  }
    97          }
    98

That's better. Not pretty .. but seems to work on the linux boxen .. however on ye Solaris 10 sparc I see :

PASS: libidn_toascii_fuzzer
.
.
.
.... and then everything hangs .. for a while ... and then ...

PASS: libidn_tounicode_fuzzer
../build-aux/test-driver: line 107: 10364 Segmentation Fault (core dumped) "$@" > $log_file 2>&1
FAIL: libidn_stringprep_fuzzer

So this isn't pretty.

Dennis



reply via email to

[Prev in Thread] Current Thread [Next in Thread]