test: fix generate-sym-test using the wrong array
The second check was searching the symbols into the same array, but using the size of the other. This generated a SIGSEV when they occassionally mismatched.
This commit is contained in:
@@ -105,9 +105,9 @@ int main(void) {
|
||||
}
|
||||
|
||||
for (j = 0; symbols_from_source[j].name; j++) {
|
||||
struct symbol*n = bsearch(symbols_from_source+j, symbols_from_source, sizeof(symbols_from_sym)/sizeof(symbols_from_sym[0])-1, sizeof(symbols_from_sym[0]), sort_callback);
|
||||
struct symbol*n = bsearch(symbols_from_source+j, symbols_from_sym, sizeof(symbols_from_sym)/sizeof(symbols_from_sym[0])-1, sizeof(symbols_from_sym[0]), sort_callback);
|
||||
if (!n)
|
||||
printf("Found in sources, but not in symbol file: %s\\n", symbols_from_source[i].name);
|
||||
printf("Found in sources, but not in symbol file: %s\\n", symbols_from_source[j].name);
|
||||
}
|
||||
|
||||
return i == j ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user