Skip to content
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

Supporting error checking user-defined variadic functions #52

Open
mheinsen opened this issue Jul 2, 2014 · 2 comments
Open

Supporting error checking user-defined variadic functions #52

mheinsen opened this issue Jul 2, 2014 · 2 comments

Comments

@mheinsen
Copy link
Owner

mheinsen commented Jul 2, 2014

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
Copy link
Owner Author

mheinsen commented Jul 8, 2014

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
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant