mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-21 19:08:31 +00:00
8332473: ubsan: growableArray.hpp:290:10: runtime error: null pointer passed as argument 1, which is declared to never be null
Reviewed-by: jsjolen, clanger
This commit is contained in:
parent
414a7fdc5e
commit
e529101ea3
@ -287,10 +287,12 @@ public:
|
||||
}
|
||||
|
||||
void sort(int f(E*, E*)) {
|
||||
if (_data == nullptr) return;
|
||||
qsort(_data, length(), sizeof(E), (_sort_Fn)f);
|
||||
}
|
||||
// sort by fixed-stride sub arrays:
|
||||
void sort(int f(E*, E*), int stride) {
|
||||
if (_data == nullptr) return;
|
||||
qsort(_data, length() / stride, sizeof(E) * stride, (_sort_Fn)f);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user