Changeset: e2107613fd42 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e2107613fd42
Modified Files:
monetdb5/extras/pyapi/Benchmarks/pyapi_test.sh
monetdb5/extras/pyapi/Benchmarks/randomstrings.c
Branch: pyapi
Log Message:
Fix integer overflow in string generation.
diffs (43 lines):
diff --git a/monetdb5/extras/pyapi/Benchmarks/pyapi_test.sh
b/monetdb5/extras/pyapi/Benchmarks/pyapi_test.sh
--- a/monetdb5/extras/pyapi/Benchmarks/pyapi_test.sh
+++ b/monetdb5/extras/pyapi/Benchmarks/pyapi_test.sh
@@ -23,15 +23,15 @@ export OUTPUT_TESTING_NTESTS=10
# String tests
# Strings of the same length (mb, length)
-export STRINGSAMELENGTH_TESTING_SIZES="(100,1) (100,10) (100,100) (100,1000)
(100,1000) (100,10000) (100,100000)"
-export STRINGSAMELENGTH_TESTING_NTESTS=10
+export STRINGSAMELENGTH_TESTING_SIZES="(10000,1) (10000,10) (10000,100)
(10000,1000) (10000,1000) (10000,10000) (10000,100000)"
+export STRINGSAMELENGTH_TESTING_NTESTS=1
# Extreme length string testing (all strings have length 1 except for one
string, which has EXTREME length)
# Arguments are (Extreme Length, String Count)
export STRINGEXTREMELENGTH_TESTING_SIZES="(10,100000) (100,100000)
(1000,100000) (10000,100000)"
-export STRINGEXTREMELENGTH_TESTING_NTESTS=10
+export STRINGEXTREMELENGTH_TESTING_NTESTS=1
# Check Unicode vs Always Unicode (ASCII) (mb, length)
export STRINGUNICODE_TESTING_SIZES="(0.1,10) (1,10) (10,10) (100,10) (0.1,100)
(1,100) (10,100) (100,100)"
-export STRINGUNICODE_TESTING_NTESTS=10
+export STRINGUNICODE_TESTING_NTESTS=1
# Multithreading tests
export MULTITHREADING_NR_THREADS="1 2 3 4 5 6 7 8"
diff --git a/monetdb5/extras/pyapi/Benchmarks/randomstrings.c
b/monetdb5/extras/pyapi/Benchmarks/randomstrings.c
--- a/monetdb5/extras/pyapi/Benchmarks/randomstrings.c
+++ b/monetdb5/extras/pyapi/Benchmarks/randomstrings.c
@@ -21,13 +21,13 @@ int main(int argc, char *argv[])
}
double size_mb;
- int string_count;
- int string_length;
+ size_t string_count;
+ size_t string_length;
size_mb = strtod(argv[1], NULL);
string_length = atoi(argv[2]);
- string_count = (int) (size_mb * 1000 * 1000) / string_length;
+ string_count = (size_t) (size_mb * 1000 * 1000) / string_length;
char option_string[] =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
size_t options = strlen(option_string);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list