intel / yarpgen

Yet Another Random Program Generator
Other
485 stars 53 forks source link

Question about testing ABI #151

Closed vsoch closed 3 years ago

vsoch commented 3 years ago

Hi there! I really like your testing framework, and since you have experience is random program generation was wondering if I could ask you advice for doing something similar for testing application binary interface compatibility. E.g.,:

  1. Generate program A
  2. Generate program B that should link to program A
  3. Find cases when there are issues

For the third, there is a tool my group is working on to make this assessment, so really I think I'm just asking if you think there is a reasonable way to generate sets of programs that link to one another, and simulate error cases? Thank you!

regehr commented 3 years ago

my 2 cents is that YARPGen already more or less does this, in the sense that it emits func.c and driver.c that are intended to be compiled separately and then linked.

so I think the real question you want to ask is what features you want to generate, that cross this interface, in order to get the sort of stress testing that you want. for example, YARPGen won't do anything with varargs, so if you wanted to test that you could add support for it or else create a custom fuzzer.

also you might wish to read an old 2005 paper "Random testing of C calling conventions"

vsoch commented 3 years ago

Perfecto - I'll check out that paper, thank you! I found it as a PDF if any future readers here are interested. Closing issue - thanks for your advice!