Hi all,
I have read "Preventing heartbleed bugs with safe programming languages" entry
at BLUISH CODER.
http://bluishcoder.co.nz/2014/04/11/preventing-heartbleed-bugs-with-safe-languages.html
It explains re-write C language implementation using ATS, little by little.
So great!
However, my code sometimes meet wall called as "pointer chain".
The "pointer chain" example is following:
static int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf)
{
int retval;
if (!dentry->d_sb->s_op->statfs)
return -ENOSYS;
memset(buf, 0, sizeof(*buf));
retval = security_sb_statfs(dentry);
if (retval)
return retval;
retval = dentry->d_sb->s_op->statfs(dentry, buf);
The wall is code "dentry->d_sb->s_op->statfs".
In ATS2, we should create own view and use takeout/addback pattern?
https://github.com/githwxi/ATS-Postiats/wiki/Design-patterns#takeout-addback-pattern
Or, is there more better solution?
Thank's,
--
Kiwamu Okabe at METASEPI DESIGN