Sorry, I think I might have been unclear. I see that your patch does fix the issue. However, I think we should go even further: A main function that does not exist should be better than a main function that is weak, as it would properly lead to linker issues instead of odd runtime behaviour.
The following patch (on top of master) should achieve the same result while also removing the main function altogether for fuzzers (except AFL).
0diff --git a/src/test/fuzz/fuzz.cpp b/src/test/fuzz/fuzz.cpp
1index a6ab620e21..5a7b96c89b 100644
2--- a/src/test/fuzz/fuzz.cpp
3+++ b/src/test/fuzz/fuzz.cpp
4@@ -44,9 +44,9 @@ extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv)
5 return 0;
6 }
7
8-// Declare main(...) "weak" to allow for libFuzzer linking. libFuzzer provides
9-// the main(...) function.
10-__attribute__((weak)) int main(int argc, char** argv)
11+// The fuzzer generally provides the main function, except for AFL
12+#if defined(__AFL_COMPILER)
13+int main(int argc, char** argv)
14 {
15 initialize();
16 #ifdef __AFL_INIT
17@@ -74,3 +74,4 @@ __attribute__((weak)) int main(int argc, char** argv)
18 #endif
19 return 0;
20 }
21+#endif