-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-7574] Use libfuzzer on the demangler #50116
Comments
We already guarantee in debug builds that every symbol we mangle can be demangled, so a proper fuzzer would have to mutate the symbols in Swift binaries to be useful. |
@belkadan I am assuming you mispoke and meant when asserts are enabled? |
Er, yes, sorry for imprecision. |
No worries. I am imprecise all the time as well ; ). I was specifically imagining a simple driver that just pushed strings through swift-demangle. I am not talking about generating swift programs with libfuzzer. I am just talking about generating/mixing random strings. |
And to be clear, I know how to do this ; ). So I am going to mark making the infrastructure a starter bug. |
Comment by Tapan Thaker (JIRA) @gottesmm: Wanted to take up this bug, but I am not entirely sure what you mean. Trying to get clarity: This task involves the following subtasks: |
tt (JIRA User) This was actually implemented recently by @dcci. I just forgot to move this bug to resolved. That being said there are other opportunities for fuzzing that we would like to implement. Consider for instance a fuzzer that took in a sil module and then fuzzed the optimizer list. Would something like that interest you? |
Comment by Tapan Thaker (JIRA) @gottesmm: Sure, I will be interested. I am still pretty new to the codebase. So might need some help here and there 🙂. |
tt (JIRA User) Sure. Here is an SR for it: https://bugs.swift.org/browse/SR-7994 I outlined there what I imagined was the simplest way to do this. Lets continue the discussion there. |
Additional Detail from JIRA
md5: d743c2f6a14a558328505e603463db0b
Issue Description:
This task would involve creating a driver that invokes the demangler. My suggestion would be to start with the demangler test cases. Another possible source of test cases are symbols in swift binaries and in sil test cases if they start with the $S prefix.
The text was updated successfully, but these errors were encountered: