Hi Dave,
As you mention, I do use wllvm to do the compilation and extract-bc work.
For now, the call graph works fine on CVE-2014-8130 after I recompile the program. I don't know why. It is weird.
However, the call graph stll has some problem on CVE-2017-16942. The call graph just miss something. I follow your advice and I check the IR and find everything is in there. By the way, I also try to recompile the program but don't work.
According to the code, the call graph in CVE-2017-16942 is :
psf_open_file -> wav_open -> wav_read_header -> wav_w64_read_fmt_chunk (this is the buggy function!)
The IR shows the same call relationship (see the attached file 16942.ll).
But if I generate the call graph by opt, it will miss psf_open_file -> wav_open and wav_read_header-> wav_w64_read_fmt_chunk.
Also, I find some interesting phenomenon. When i generate the call graph, I find some nodes in edge won't show up in nodeList. So it may looks like psf_open_file -> "" (For now I am using pydot to handle the dot generated by opt). Maybe the phenomenon is related to the missing call relationship? I have no idea.
I put the dot file and analysis result in the attached file. The dot is generated by opt and the analysis result show the map of caller callee (map[caller]= [callee1 callee2 calee3 ...]).
Do you have other idea???
Thanks a lot!!!!!!!!
Regards,
Chaz