Closed chibenwa closed 1 week ago
(and find which valid EmailAddress is failing according to javax.mail)
package org.apache.james;
import org.apache.james.core.MailAddress;
import com.code_intelligence.jazzer.junit.FuzzTest;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
public class Jazz {
@FuzzTest(maxDuration = "1m")
void test(String str) {
if (str == null) {
return;
}
MailAddress m;
try {
m = new MailAddress(str);
} catch (AddressException e) {
return;
}
try {
new InternetAddress(str);
} catch (Exception e) {
if (e.getMessage().contains("Domain contains illegal character")) {
System.out.println("====");
System.out.println(str);
System.out.println("====");
throw new RuntimeException(e);
}
}
}
}
To find parser differencials.
Cann't install code_intelligence fuzztest
on my local
The download page requests auth code, and have no way to register a new one.
I tried to another one: https://github.com/rohanpadhye/JQF/wiki/JQF-Maven-Plugin
~32 minutes later, just 0.26% coverage and no unique failure, I tend to execute it on charge server
I'm currently running a process on the charge1 server, but the execution speed is quite slow at around 1000/sec. It may take a few days or more. I will return after the fuzz test is completed.
pr : https://github.com/apache/james-project/pull/2348
// Jazzer very quick,
Yes code coverage fuzzers rocks!
DOD manage the error