ada icon indicating copy to clipboard operation
ada copied to clipboard

Add fuzzer for href setter and getter

Open CarlosEduR opened this issue 1 year ago • 1 comments

In order to improve the line coverage for fuzz testing, add fuzzer for set_href and get_href

CarlosEduR avatar May 15 '24 21:05 CarlosEduR

cc @lemire i have bad news and good news

anonrig avatar May 15 '24 22:05 anonrig

@anonrig

Indeed, the fuzzer found a bug, here it is...

https://github.com/ada-url/ada/pull/659

It is easy to narrow it down, just follow this recipe:

https://gist.github.com/lemire/f501b3b2bb8c33673de4f0a0674a6112

Takes a minute!!!

Fuzzers are great.

lemire avatar May 16 '24 01:05 lemire

See https://github.com/ada-url/ada/issues/662

lemire avatar May 16 '24 15:05 lemire

I expect that I have a fix for the bug in question at https://github.com/ada-url/ada/pull/659

lemire avatar May 16 '24 15:05 lemire

@CarlosEduR Please rebase. I have merged a bug fix.

lemire avatar May 16 '24 19:05 lemire

thanks @lemire! I was initially thinking it was something with the .to_string(), but now I see it was with the .set_pathname().

CarlosEduR avatar May 16 '24 22:05 CarlosEduR

See #662

@lemire about this comparative fuzzer, are you thinking about comparing the results of the get_href between the ada::url and the ada::url_aggregator in the fuzzer?

CarlosEduR avatar May 17 '24 03:05 CarlosEduR

I am!!!!!!!!!

lemire avatar May 17 '24 04:05 lemire

I am!!!!!!!!!

@lemire assertion added!

CarlosEduR avatar May 23 '24 15:05 CarlosEduR