diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-09-28 21:26:06 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-09-28 21:26:06 +0000 |
commit | ae13c93b7db9f9c68eaf95150ed551b3b649d8c4 (patch) | |
tree | 8ace8b70b39ec08504fcacc9dbae2e38522a8f32 /tests/libtest | |
parent | b9f8a4a477a74781fddc28ba2fe9d0713de0acf9 (diff) |
Reported in #1561470 (http://curl.haxx.se/bug/view.cgi?id=1561470), libcurl
would crash if a bad function sequence was used when shutting down after
using the multi interface (i.e using easy_cleanup after multi_cleanup) so
precautions have been added to make sure it doesn't any more - test case 529
was added to verify.
Diffstat (limited to 'tests/libtest')
-rw-r--r-- | tests/libtest/Makefile.am | 12 | ||||
-rw-r--r-- | tests/libtest/lib525.c | 8 |
2 files changed, 17 insertions, 3 deletions
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am index 877532dd9..4b52a5f9a 100644 --- a/tests/libtest/Makefile.am +++ b/tests/libtest/Makefile.am @@ -39,9 +39,10 @@ LIBDIR = $(top_builddir)/lib SUPPORTFILES = first.c test.h # These are all libcurl test programs -noinst_PROGRAMS = lib500 lib501 lib502 lib503 lib504 lib505 lib506 lib507 \ - lib508 lib509 lib510 lib511 lib512 lib513 lib514 lib515 lib516 lib517 \ - lib518 lib519 lib520 lib521 lib523 lib524 lib525 lib526 lib527 lib530 +noinst_PROGRAMS = lib500 lib501 lib502 lib503 lib504 lib505 lib506 \ + lib507 lib508 lib509 lib510 lib511 lib512 lib513 lib514 lib515 lib516 \ + lib517 lib518 lib519 lib520 lib521 lib523 lib524 lib525 lib526 lib527 \ + lib529 lib530 lib500_SOURCES = lib500.c $(SUPPORTFILES) lib500_LDADD = $(LIBDIR)/libcurl.la @@ -152,6 +153,11 @@ lib527_CFLAGS = -DLIB527 lib527_LDADD = $(LIBDIR)/libcurl.la lib527_DEPENDENCIES = $(LIBDIR)/libcurl.la +lib529_SOURCES = lib525.c $(SUPPORTFILES) +lib529_CFLAGS = -DLIB529 +lib529_LDADD = $(LIBDIR)/libcurl.la +lib529_DEPENDENCIES = $(LIBDIR)/libcurl.la + lib530_SOURCES = lib530.c $(SUPPORTFILES) lib530_CFLAGS = -DLIB530 lib530_LDADD = $(LIBDIR)/libcurl.la diff --git a/tests/libtest/lib525.c b/tests/libtest/lib525.c index 77e5c203a..240628028 100644 --- a/tests/libtest/lib525.c +++ b/tests/libtest/lib525.c @@ -123,9 +123,17 @@ int test(char *URL) res = CURLM_CALL_MULTI_PERFORM; } +#ifdef LIB529 + /* test 529 */ + curl_multi_remove_handle(m, curl); + curl_multi_cleanup(m); + curl_easy_cleanup(curl); +#else + /* test 525 */ curl_multi_remove_handle(m, curl); curl_easy_cleanup(curl); curl_multi_cleanup(m); +#endif fclose(hd_src); /* close the local file */ |