mheinsen / seec

Program visualization and debugging for novice C programmers
http://seec-team.github.io/seec/
MIT License
3 stars 0 forks source link

Supporting error checking user-defined variadic functions #52

Open mheinsen opened 10 years ago

mheinsen commented 10 years ago

SeeC currently considers it an error to read variadic arguments in a user defined variadic function, because we haven't instrumented/seen the allocation and initialization of the arguments' memory. This is moderately painful because the accessing of the arguments is lowered by Clang, so we have to deal with the internals. It's probably worth investigating MemorySanitizer's approach for handling this.

This is related to #5.

mheinsen commented 10 years ago

It's possible that it will become easier to record the memory area occupied by arguments owing to changes in the LLVM IR required by Clang's Windows support. Mentioned in this blog post: http://blog.llvm.org/2014/07/clangllvm-on-windows-update.html

It turned out that this wasn't useful for our case. For more details see the description of the feature used to support the Microsoft C++ ABI here: http://llvm.org/docs/InAlloca.html

mheinsen commented 8 years ago

It will probably be best to follow the approach of MemorySanitizer: http://llvm.org/doxygen/MemorySanitizer_8cpp_source.html